Add permits module
This commit is contained in:
@@ -7,6 +7,7 @@ import { orgSchemas } from "./organization/organization.schema";
|
||||
import { tokenSchemas } from "./tokens/token.schema";
|
||||
import { errorHandler } from "./utils/errors";
|
||||
import { authHandler, authorize } from "./auth";
|
||||
import { permitSchemas } from "./permit/permit.schema";
|
||||
|
||||
const app = fastify({ logger: true });
|
||||
|
||||
@@ -19,7 +20,12 @@ app.setErrorHandler(errorHandler);
|
||||
app.addHook("onRequest", authHandler);
|
||||
app.register(routes, { prefix: "/api/v1" });
|
||||
|
||||
for (const schema of [...userSchemas, ...orgSchemas, ...tokenSchemas]) {
|
||||
for (const schema of [
|
||||
...userSchemas,
|
||||
...orgSchemas,
|
||||
...tokenSchemas,
|
||||
...permitSchemas,
|
||||
]) {
|
||||
app.addSchema(schema);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user