mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-27 23:36:39 +00:00
Trying to add site provider
This commit is contained in:
@@ -13,7 +13,7 @@ import { eq, and } from 'drizzle-orm';
|
||||
const API_BASE_URL = "http://localhost:3000";
|
||||
|
||||
const createSiteParamsSchema = z.object({
|
||||
orgId: z.number().int().positive(),
|
||||
orgId: z.string().transform(Number).pipe(z.number().int().positive())
|
||||
});
|
||||
|
||||
// Define Zod schema for request body validation
|
||||
|
||||
@@ -14,6 +14,14 @@ const getSiteSchema = z.object({
|
||||
siteId: z.string().transform(Number).pipe(z.number().int().positive())
|
||||
});
|
||||
|
||||
export type GetSiteResponse = {
|
||||
siteId: number;
|
||||
name: string;
|
||||
subdomain: string;
|
||||
pubKey: string;
|
||||
subnet: string;
|
||||
}
|
||||
|
||||
export async function getSite(req: Request, res: Response, next: NextFunction): Promise<any> {
|
||||
try {
|
||||
// Validate request parameters
|
||||
|
||||
Reference in New Issue
Block a user