Skip to content

Commit

Permalink
OV-404: * enum
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Sep 26, 2024
1 parent f3a9ea9 commit 9bd6ded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const templateErrorMessage = {
YOU_CAN_NOT_DELETE_THIS_TEMPLATE: 'You can not delete this template',
YOU_CAN_NOT_UPDATE_THIS_TEMPLATE: 'You can not update this template',
TEMPLATE_DOES_NOT_EXIST: 'Template does not exist',
} as const;

Expand Down
2 changes: 1 addition & 1 deletion backend/src/bundles/templates/templates.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class TemplateService implements Service {

if (template?.userId !== userId) {
throw new HttpError({
message: templateErrorMessage.YOU_CAN_NOT_DELETE_THIS_TEMPLATE,
message: templateErrorMessage.YOU_CAN_NOT_UPDATE_THIS_TEMPLATE,
status: HTTPCode.BAD_REQUEST,
});
}
Expand Down

0 comments on commit 9bd6ded

Please sign in to comment.