chore: small changes

This commit is contained in:
Catalin Pit
2023-12-20 12:47:46 +02:00
parent 17486b961d
commit fb46b09e4f
2 changed files with 6 additions and 5 deletions

View File

@ -67,7 +67,7 @@ const router = createNextRoute(contract, {
return { return {
status: 404, status: 404,
body: { body: {
message: 'Document not found', message: e.message ?? 'Document not found',
}, },
}; };
} }
@ -106,7 +106,7 @@ const router = createNextRoute(contract, {
return { return {
status: 404, status: 404,
body: { body: {
message: 'Document not found', message: e.message ?? 'Document not found',
}, },
}; };
} }
@ -128,7 +128,7 @@ const router = createNextRoute(contract, {
return { return {
status: 404, status: 404,
body: { body: {
message: 'An error has occured while uploading the file', message: e.message ?? 'An error has occured while uploading the file',
}, },
}; };
} }
@ -219,7 +219,7 @@ const router = createNextRoute(contract, {
return { return {
status: 500, status: 500,
body: { body: {
message: 'An error occurred while uploading your document.', message: e.message ?? 'An error has occured while sending the document for signing',
}, },
}; };
} }

View File

@ -51,13 +51,14 @@ export const contract = c.router(
}, },
sendDocumentForSigning: { sendDocumentForSigning: {
method: 'PATCH', method: 'PATCH',
path: '/documents/:id/send-for-signing', path: '/documents/:id/send',
body: SendDocumentForSigningMutationSchema, body: SendDocumentForSigningMutationSchema,
responses: { responses: {
200: SuccessfulSigningResponseSchema, 200: SuccessfulSigningResponseSchema,
400: UnsuccessfulResponseSchema, 400: UnsuccessfulResponseSchema,
401: UnsuccessfulResponseSchema, 401: UnsuccessfulResponseSchema,
404: UnsuccessfulResponseSchema, 404: UnsuccessfulResponseSchema,
500: UnsuccessfulResponseSchema,
}, },
summary: 'Send a document for signing', summary: 'Send a document for signing',
}, },