feat: comments delete + refresh on post + formatting

This commit is contained in:
NGPixel
2020-05-31 02:13:41 -04:00
parent 83f7c2867d
commit 8a74904731
7 changed files with 375 additions and 52 deletions

View File

@@ -97,6 +97,26 @@ module.exports = {
message: 'Too many attempts! Try again later.',
code: 1008
}),
CommentGenericError: CustomError('CommentGenericError', {
message: 'An unexpected error occured.',
code: 8001
}),
CommentPostForbidden: CustomError('CommentPostForbidden', {
message: 'You are not authorized to post a comment on this page.',
code: 8002
}),
CommentContentMissing: CustomError('CommentContentMissing', {
message: 'Comment content is missing or too short.',
code: 8003
}),
CommentManageForbidden: CustomError('CommentManageForbidden', {
message: 'You are not authorized to manage comments on this page.',
code: 8004
}),
CommentNotFound: CustomError('CommentNotFound', {
message: 'This comment does not exist.',
code: 8005
}),
InputInvalid: CustomError('InputInvalid', {
message: 'Input data is invalid.',
code: 1012