From 4667dfee78852de3f329ba8885634499f0f6b483 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Mon, 23 Sep 2024 23:24:59 +0200 Subject: [PATCH] Update import paths --- frontend/cash/cash.tsx | 2 +- frontend/list/elements.tsx | 4 ++-- frontend/list/list.tsx | 6 +++--- miscellaneous/checkAuthenticated.ts | 2 +- models/cashTransactionModel.ts | 2 +- models/mediaModel.ts | 2 +- models/userModel.ts | 2 +- routes/api/apiRouter.ts | 6 +++--- routes/user.ts | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/cash/cash.tsx b/frontend/cash/cash.tsx index bd8db9b..adb7721 100644 --- a/frontend/cash/cash.tsx +++ b/frontend/cash/cash.tsx @@ -1,5 +1,5 @@ import Chart from 'chart.js/auto' -import * as elements from "../elementcreate"; +import * as elements from "frontend/elementcreate"; interface Transaction { day: number; diff --git a/frontend/list/elements.tsx b/frontend/list/elements.tsx index 23b1b8c..ca9afcf 100644 --- a/frontend/list/elements.tsx +++ b/frontend/list/elements.tsx @@ -1,5 +1,5 @@ -import type { Attributes } from "../elementcreate"; -import * as elements from "../elementcreate"; +import type { Attributes } from "frontend/elementcreate"; +import * as elements from "frontend/elementcreate"; function MediaElement(attributes: Attributes, contents: string[]) { const ret =
diff --git a/frontend/list/list.tsx b/frontend/list/list.tsx index 8989746..80dc9c1 100644 --- a/frontend/list/list.tsx +++ b/frontend/list/list.tsx @@ -1,7 +1,7 @@ -import { MediaElement, MyHeader, MediaContainer } from "./elements"; -import { splitByTitle, splitByYear } from "./functions"; +import { MediaElement, MyHeader, MediaContainer } from "frontend/list/elements"; +import { splitByTitle, splitByYear } from "frontend/list/functions"; -import * as elements from "../elementcreate"; +import * as elements from "frontend/elementcreate"; var sortType = 0; var listType = 0; diff --git a/miscellaneous/checkAuthenticated.ts b/miscellaneous/checkAuthenticated.ts index d9c954e..f28a25c 100644 --- a/miscellaneous/checkAuthenticated.ts +++ b/miscellaneous/checkAuthenticated.ts @@ -1,5 +1,5 @@ import { type NextFunction, type Request, type Response } from "express"; -import userModel, { values } from '../models/userModel'; +import userModel, { values } from 'models/userModel'; async function checkAuthenticated(req: Request, res: Response, next: NextFunction) { const pass = req.body.pass; diff --git a/models/cashTransactionModel.ts b/models/cashTransactionModel.ts index 7169f77..d349202 100644 --- a/models/cashTransactionModel.ts +++ b/models/cashTransactionModel.ts @@ -1,5 +1,5 @@ import { type ResultSetHeader, type RowDataPacket, type QueryOptions } from "mysql2" -import pool from '../miscellaneous/db' +import pool from 'miscellaneous/db' interface CashTransaction extends RowDataPacket { id?: number; diff --git a/models/mediaModel.ts b/models/mediaModel.ts index b44ae6b..cbfbe4b 100644 --- a/models/mediaModel.ts +++ b/models/mediaModel.ts @@ -1,5 +1,5 @@ import { type ResultSetHeader, type RowDataPacket, type QueryOptions } from "mysql2" -import pool from '../miscellaneous/db' +import pool from 'miscellaneous/db' interface Media extends RowDataPacket { diff --git a/models/userModel.ts b/models/userModel.ts index fceb279..c453417 100644 --- a/models/userModel.ts +++ b/models/userModel.ts @@ -1,5 +1,5 @@ import { type ResultSetHeader, type RowDataPacket } from "mysql2" -import pool from '../miscellaneous/db' +import pool from 'miscellaneous/db' interface UserD extends RowDataPacket { name?: string; diff --git a/routes/api/apiRouter.ts b/routes/api/apiRouter.ts index d0eb931..c26e137 100644 --- a/routes/api/apiRouter.ts +++ b/routes/api/apiRouter.ts @@ -1,7 +1,7 @@ import express, { type Request, type Response } from "express"; -import checkAuthenticated from '../../miscellaneous/checkAuthenticated'; -import mediaRouter from './mediaRouter'; -import cashTransactionRouter from './cashTransactionRouter'; +import checkAuthenticated from 'miscellaneous/checkAuthenticated'; +import mediaRouter from 'routes/api/mediaRouter'; +import cashTransactionRouter from 'routes/api/cashTransactionRouter'; const router = express.Router(); diff --git a/routes/user.ts b/routes/user.ts index 110f05a..9c3e856 100644 --- a/routes/user.ts +++ b/routes/user.ts @@ -1,6 +1,6 @@ import express, { type Request, type Response } from "express"; -import userController from '../controllers/userController'; -import checkAuthenticated from '../miscellaneous/checkAuthenticated'; +import userController from 'controllers/userController'; +import checkAuthenticated from 'miscellaneous/checkAuthenticated'; const router = express.Router();