Add dockerfile, small fixes
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import mongoose from "mongoose";
|
||||
import fastify from "fastify";
|
||||
|
||||
import routes from "./routes";
|
||||
@@ -6,7 +5,7 @@ import { userSchemas } from "./user/user.schema";
|
||||
import { orgSchemas } from "./organization/organization.schema";
|
||||
import { tokenSchemas } from "./tokens/token.schema";
|
||||
import { errorHandler } from "./utils/errors";
|
||||
import { authHandler, authorize } from "./auth";
|
||||
import { authorize } from "./auth";
|
||||
import { permitSchemas } from "./permit/permit.schema";
|
||||
|
||||
const app = fastify({ logger: true });
|
||||
@@ -17,7 +16,6 @@ app.get("/health", (req, res) => {
|
||||
|
||||
app.decorate("authorize", authorize);
|
||||
app.setErrorHandler(errorHandler);
|
||||
app.addHook("onRequest", authHandler);
|
||||
app.register(routes, { prefix: "/api/v1" });
|
||||
|
||||
for (const schema of [
|
||||
|
||||
Reference in New Issue
Block a user