api end fixes
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user