From 60e564781d5f5149a5424b972f2224fc910e154d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 27 Dec 2023 06:42:28 -0500 Subject: [PATCH] refactor(*): use more sane path aliases --- lib/server/middlewareButNotReally/index.ts | 6 ++++++ server/api/review/[id]/index.get.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 lib/server/middlewareButNotReally/index.ts diff --git a/lib/server/middlewareButNotReally/index.ts b/lib/server/middlewareButNotReally/index.ts new file mode 100644 index 0000000..02c11f0 --- /dev/null +++ b/lib/server/middlewareButNotReally/index.ts @@ -0,0 +1,6 @@ +import isIdNan from "./isIdNan"; +import isAdmin from "./isAdmin"; +import isLoggedIn from "./isLoggedIn"; +import storyCheck from "./storyCheck"; +import * as storyPrivileges from "./storyPrivileges"; +export { isIdNan, isAdmin, isLoggedIn, storyCheck, storyPrivileges }; diff --git a/server/api/review/[id]/index.get.ts b/server/api/review/[id]/index.get.ts index 3c1db74..322fcd5 100644 --- a/server/api/review/[id]/index.get.ts +++ b/server/api/review/[id]/index.get.ts @@ -1,6 +1,6 @@ -import { messages } from "~/lib/server/constants"; -import { Review } from "~/models/stories/review"; -import isIdNan from "~/lib/server/middlewareButNotReally/isIdNan"; +import { messages } from "@server/constants"; +import { Review } from "@models/stories/review"; +import isIdNan from "@server/middlewareButNotReally/isIdNan"; export default eventHandler(async (ev) => { const revid = isIdNan(ev);