mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
Api changes
This commit is contained in:
parent
94da55450e
commit
0fa3382cda
20 changed files with 319 additions and 154 deletions
|
@ -8,9 +8,10 @@ import createHttpError from 'http-errors';
|
|||
import { ActionsEnum, checkUserActionPermission } from '@server/auth/actions';
|
||||
import logger from '@server/logger';
|
||||
import { eq, and } from 'drizzle-orm';
|
||||
import stoi from '@server/utils/stoi';
|
||||
|
||||
const createResourceParamsSchema = z.object({
|
||||
siteId: z.string().transform(Number).pipe(z.number().int().positive()),
|
||||
siteId: z.string().optional().transform(stoi).pipe(z.number().int().positive().optional()),
|
||||
orgId: z.string()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue