api end fixes

This commit is contained in:
2026-06-19 23:45:56 -07:00
parent 84f894c356
commit e3e520f7a9
6 changed files with 30 additions and 15 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import { template } from "lodash"
import { APPLICATION_NAME, GIT_COMMIT_HASH, NODE_ENV, RELEASE_TAG } from "@/config"
import { logger } from "@/utils/logger"
import { jwtMiddleware, findAndAuthorizeCurrentUserMiddleware } from "@/middlewares"
import { jwtMiddleware, authorizationMiddleware } from "@/middlewares"
import { CurrentUserController, UsersController } from "@/controllers"
@@ -31,7 +31,7 @@ router.route("/_status").get((_req: Request, res: Response) => {
// external (public) routes - no authentication required
// api routes
router.use("/api", jwtMiddleware, findAndAuthorizeCurrentUserMiddleware)
router.use("/api", jwtMiddleware, authorizationMiddleware)
router.route("/api/current-user").get(CurrentUserController.show)