From 7215950d86d5ebda76e0c603bf88e04370411562 Mon Sep 17 00:00:00 2001 From: Aydan Pirani Date: Mon, 14 Aug 2023 09:57:51 -0700 Subject: [PATCH] Restructured API filestructure --- api/index.ts | 6 +++--- {api => src}/constants.ts | 0 {api => src}/database.ts | 0 {api => src}/middleware/select-auth.ts | 0 {api => src}/models.ts | 0 {api => src}/services/auth/auth-lib.ts | 0 {api => src}/services/auth/auth-models.ts | 0 {api => src}/services/auth/auth-router.ts | 0 {api => src}/services/newsletter/newsletter-formats.ts | 0 {api => src}/services/newsletter/newsletter-lib.ts | 0 {api => src}/services/newsletter/newsletter-router.ts | 0 {api => src}/services/newsletter/newsletter-schemas.ts | 0 {api => src}/utils.ts | 0 13 files changed, 3 insertions(+), 3 deletions(-) rename {api => src}/constants.ts (100%) rename {api => src}/database.ts (100%) rename {api => src}/middleware/select-auth.ts (100%) rename {api => src}/models.ts (100%) rename {api => src}/services/auth/auth-lib.ts (100%) rename {api => src}/services/auth/auth-models.ts (100%) rename {api => src}/services/auth/auth-router.ts (100%) rename {api => src}/services/newsletter/newsletter-formats.ts (100%) rename {api => src}/services/newsletter/newsletter-lib.ts (100%) rename {api => src}/services/newsletter/newsletter-router.ts (100%) rename {api => src}/services/newsletter/newsletter-schemas.ts (100%) rename {api => src}/utils.ts (100%) diff --git a/api/index.ts b/api/index.ts index fd71c408..31c6fc6d 100644 --- a/api/index.ts +++ b/api/index.ts @@ -4,9 +4,9 @@ import express, { Application, Request, Response } from "express"; import helmet from "helmet"; import morgan from "morgan"; -import Constants from "./constants.js"; -import authRouter from "./services/auth/auth-router.js"; -import newsletterRouter from "./services/newsletter/newsletter-router.js"; +import Constants from "../src/constants.js"; +import authRouter from "../src/services/auth/auth-router.js"; +import newsletterRouter from "../src/services/newsletter/newsletter-router.js"; const app: Application = express(); diff --git a/api/constants.ts b/src/constants.ts similarity index 100% rename from api/constants.ts rename to src/constants.ts diff --git a/api/database.ts b/src/database.ts similarity index 100% rename from api/database.ts rename to src/database.ts diff --git a/api/middleware/select-auth.ts b/src/middleware/select-auth.ts similarity index 100% rename from api/middleware/select-auth.ts rename to src/middleware/select-auth.ts diff --git a/api/models.ts b/src/models.ts similarity index 100% rename from api/models.ts rename to src/models.ts diff --git a/api/services/auth/auth-lib.ts b/src/services/auth/auth-lib.ts similarity index 100% rename from api/services/auth/auth-lib.ts rename to src/services/auth/auth-lib.ts diff --git a/api/services/auth/auth-models.ts b/src/services/auth/auth-models.ts similarity index 100% rename from api/services/auth/auth-models.ts rename to src/services/auth/auth-models.ts diff --git a/api/services/auth/auth-router.ts b/src/services/auth/auth-router.ts similarity index 100% rename from api/services/auth/auth-router.ts rename to src/services/auth/auth-router.ts diff --git a/api/services/newsletter/newsletter-formats.ts b/src/services/newsletter/newsletter-formats.ts similarity index 100% rename from api/services/newsletter/newsletter-formats.ts rename to src/services/newsletter/newsletter-formats.ts diff --git a/api/services/newsletter/newsletter-lib.ts b/src/services/newsletter/newsletter-lib.ts similarity index 100% rename from api/services/newsletter/newsletter-lib.ts rename to src/services/newsletter/newsletter-lib.ts diff --git a/api/services/newsletter/newsletter-router.ts b/src/services/newsletter/newsletter-router.ts similarity index 100% rename from api/services/newsletter/newsletter-router.ts rename to src/services/newsletter/newsletter-router.ts diff --git a/api/services/newsletter/newsletter-schemas.ts b/src/services/newsletter/newsletter-schemas.ts similarity index 100% rename from api/services/newsletter/newsletter-schemas.ts rename to src/services/newsletter/newsletter-schemas.ts diff --git a/api/utils.ts b/src/utils.ts similarity index 100% rename from api/utils.ts rename to src/utils.ts