mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
Update ESLint configuration and schemas to use Zod library
- Changed ESLint configuration to target TypeScript files and added parser options for better integration. - Updated various schemas across the application to replace `nestjs-zod/z` imports with `zod` for consistency. - Refactored password validation in authentication schemas to use `z.string()` instead of `z.password()`. - Enhanced date handling in user and resume schemas by introducing a new `dateSchema` utility. - Updated `.ncurc.json` to target minor upgrades for dependencies.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { idSchema } from "@reactive-resume/schema";
|
||||
import { z } from "nestjs-zod/z";
|
||||
import { z } from "zod";
|
||||
|
||||
export const payloadSchema = z.object({
|
||||
id: idSchema,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { z } from "nestjs-zod/z";
|
||||
import { z } from "zod";
|
||||
|
||||
export const configSchema = z.object({
|
||||
NODE_ENV: z.enum(["development", "production"]).default("production"),
|
||||
|
||||
@ -114,7 +114,7 @@ export class ResumeService {
|
||||
title: updateResumeDto.title,
|
||||
slug: updateResumeDto.slug,
|
||||
visibility: updateResumeDto.visibility,
|
||||
data: updateResumeDto.data as unknown as Prisma.JsonObject,
|
||||
data: updateResumeDto.data as Prisma.JsonObject,
|
||||
},
|
||||
where: { userId_id: { userId, id } },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user