import {OpenAPIHono} from "@hono/zod-openapi"; import {authMiddleware} from "./middleware/authMiddleware.js"; import login from "./routes/login.js"; import register from "./routes/register.js"; import session from "./routes/session.js"; import getAccess from "./routes/userRoles/getUserRoles.js"; import setAccess from "./routes/userRoles/setUserRoles.js"; import profile from "./routes/user/profileUpdate.js"; import {areRolesIn} from "./utils/roleCheck.js"; const app = new OpenAPIHono(); // run the role check areRolesIn(); app.route("auth/login", login); app.route("auth/register", register); app.route("auth/session", session); // required to login /* User area just needs to be logged in to enter here */ app.route("auth/profileupdate", profile); /* will need to increase to make sure the person coming here has the correct permissions */ app.route("auth/getuseraccess", getAccess); app.route("auth/setuseraccess", setAccess); export default app;