mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-25 09:24:54 +10:00
- fixes #2562, add better error messages for duplicate resume slugs
- improvements made to ditgar template - general improvements to all templates with backgrounds - update dependencies and translations - improved print function that handles single page and multi page resumes
This commit is contained in:
@@ -166,6 +166,12 @@ export const resumeRouter = {
|
||||
}),
|
||||
)
|
||||
.output(z.string().describe("The ID of the created resume."))
|
||||
.errors({
|
||||
RESUME_SLUG_ALREADY_EXISTS: {
|
||||
message: "A resume with this slug already exists.",
|
||||
status: 400,
|
||||
},
|
||||
})
|
||||
.handler(async ({ context, input }) => {
|
||||
return await resumeService.create({
|
||||
name: input.name,
|
||||
@@ -187,6 +193,12 @@ export const resumeRouter = {
|
||||
})
|
||||
.input(z.object({ data: resumeDataSchema }))
|
||||
.output(z.string().describe("The ID of the imported resume."))
|
||||
.errors({
|
||||
RESUME_SLUG_ALREADY_EXISTS: {
|
||||
message: "A resume with this slug already exists.",
|
||||
status: 400,
|
||||
},
|
||||
})
|
||||
.handler(async ({ context, input }) => {
|
||||
const name = generateRandomName();
|
||||
const slug = slugify(name);
|
||||
@@ -220,6 +232,12 @@ export const resumeRouter = {
|
||||
}),
|
||||
)
|
||||
.output(z.void())
|
||||
.errors({
|
||||
RESUME_SLUG_ALREADY_EXISTS: {
|
||||
message: "A resume with this slug already exists.",
|
||||
status: 400,
|
||||
},
|
||||
})
|
||||
.handler(async ({ context, input }) => {
|
||||
return await resumeService.update({
|
||||
id: input.id,
|
||||
|
||||
Reference in New Issue
Block a user