add notes routes

This commit is contained in:
2025-02-07 18:39:55 +05:30
parent a130d0cb73
commit d043b5aed7
8 changed files with 312 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import {
updateRtsHandler,
} from "./rts.controller";
import { hideFields } from "../auth";
import { noteRoutes } from "../note/note.route";
export async function rtsRoutes(fastify: FastifyInstance) {
fastify.post(
@@ -94,5 +95,11 @@ export async function rtsRoutes(fastify: FastifyInstance) {
newFilesHandler
);
await noteRoutes(fastify, {
read: "rts:read",
write: "rts:write",
delete: "rts:delete",
});
fastify.addHook("onSend", hideFields("rts"));
}