fix(auth): fixed the getaccess to be getuseraccess as it was orignally
This commit is contained in:
@@ -1,10 +1,7 @@
|
|||||||
import { z, createRoute, OpenAPIHono } from "@hono/zod-openapi";
|
import { z, createRoute, OpenAPIHono } from "@hono/zod-openapi";
|
||||||
import { apiHit } from "../../../../globalUtils/apiHits.js";
|
|
||||||
import jwt from "jsonwebtoken";
|
import jwt from "jsonwebtoken";
|
||||||
|
|
||||||
import type { CustomJwtPayload } from "../../../../types/jwtToken.js";
|
import type { CustomJwtPayload } from "../../../../types/jwtToken.js";
|
||||||
import { authMiddleware } from "../../middleware/authMiddleware.js";
|
import { authMiddleware } from "../../middleware/authMiddleware.js";
|
||||||
import hasCorrectRole from "../../middleware/roleCheck.js";
|
|
||||||
import { roleCheck } from "../../controllers/userRoles/getUserAccess.js";
|
import { roleCheck } from "../../controllers/userRoles/getUserAccess.js";
|
||||||
|
|
||||||
const { verify } = jwt;
|
const { verify } = jwt;
|
||||||
@@ -16,10 +13,10 @@ const responseSchema = z.object({
|
|||||||
|
|
||||||
app.openapi(
|
app.openapi(
|
||||||
createRoute({
|
createRoute({
|
||||||
tags: ["Auth:user"],
|
tags: ["auth:user"],
|
||||||
summary: "returns the users access",
|
summary: "returns the users access",
|
||||||
method: "get",
|
method: "get",
|
||||||
path: "/getAccess",
|
path: "/getuseraccess",
|
||||||
middleware: [authMiddleware],
|
middleware: [authMiddleware],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
|
|||||||
Reference in New Issue
Block a user