add rts routes
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
listOrgsHandler,
|
||||
updateOrgHandler,
|
||||
} from "./organization.controller";
|
||||
import { hideFields } from "../auth";
|
||||
|
||||
export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
fastify.post(
|
||||
@@ -14,9 +15,6 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
{
|
||||
schema: {
|
||||
body: $org("createOrgInput"),
|
||||
response: {
|
||||
201: $org("createOrgResponse"),
|
||||
},
|
||||
},
|
||||
config: { requiredClaims: ["org:write"] },
|
||||
preHandler: [fastify.authorize],
|
||||
@@ -46,7 +44,6 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
{
|
||||
schema: {
|
||||
querystring: $org("pageQueryParams"),
|
||||
response: { 200: $org("listOrgResponse") },
|
||||
},
|
||||
config: { requiredClaims: ["org:read"] },
|
||||
preHandler: [fastify.authorize],
|
||||
@@ -60,9 +57,6 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
schema: {
|
||||
params: { type: "object", properties: { orgId: { type: "string" } } },
|
||||
body: $org("updateOrgInput"),
|
||||
response: {
|
||||
200: $org("createOrgResponse"),
|
||||
},
|
||||
},
|
||||
config: { requiredClaims: ["org:write"] },
|
||||
preHandler: [fastify.authorize],
|
||||
@@ -81,4 +75,6 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
},
|
||||
deleteOrgHandler
|
||||
);
|
||||
|
||||
fastify.addHook("onSend", hideFields("orgs"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user