mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 17:25:19 +03:00
feat: Sync to OSS repo
This commit is contained in:
6
apps/api/app/utils/result.ts
Normal file
6
apps/api/app/utils/result.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { resolver } from 'hono-openapi/zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
export function Result<T extends z.ZodTypeAny>(schema: T) {
|
||||
return resolver(z.object({ data: schema }));
|
||||
}
|
||||
Reference in New Issue
Block a user