view route updates

This commit is contained in:
2025-05-26 16:00:05 +05:30
parent b51e36ebad
commit ffef6fe644
5 changed files with 35 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import { buildJsonSchemas } from "fastify-zod";
import mongoose from "mongoose";
import mongoose, { Collection } from "mongoose";
import { TypeOf, z } from "zod";
import { pageQueryParams } from "../pagination";
@@ -66,7 +66,10 @@ export const defaultViewModel = mongoose.model(
"defaultView"
);
const setDefaultView = z.record(z.string(), z.string());
const setDefaultView = z.object({
collection: z.string(),
viewId: z.string(),
});
export type SetDefaultView = z.infer<typeof setDefaultView>;