awesome-compose/react-express-mongodb/backend/config/messages.js
Jérémie Drouet 9696296945 react-express-mongodb: rename server to backend
The goal here is to keep the same structure than the other examples.
Also, considering that it has a "frontend" folder, the equivalent for
the server should be "backend".

Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-12 15:24:00 +02:00

63 lines
1.5 KiB
JavaScript

module.exports = {
AUTHENTICATION_FAILED: {
code: 400,
message: 'Authentication failed. Please login with valid credentials.',
success: false,
},
SUCCESSFUL_LOGIN: {
code: 200,
message: 'Successfully logged in',
success: true,
},
INTERNAL_SERVER_ERROR: {
code: 500,
message: 'Something unexpected happened',
success: false,
},
UNAUTHORIZED: {
code: 401,
message: 'You session is expired. Please login again',
success: false,
},
SUCCESSFUL_DELETE: {
code: 200,
message: 'Successfully deleted',
success: true,
},
SUCCESSFUL_UPDATE: {
code: 200,
message: 'Updated successfully',
success: true,
},
SUCCESSFUL: {
code: 200,
success: true,
message: 'Successfully completed',
},
NOT_FOUND: {
code: 404,
success: true,
message: 'Requested API not found',
},
ALREADY_EXIST: {
code: 200,
success: true,
message: 'Already exists',
},
FORBIDDEN: {
code: 403,
message: 'You are not authorized to complete this action',
success: false,
},
BAD_REQUEST: {
code: 400,
message: 'Bad request. Please try again with valid parameters',
success: false,
},
IN_COMPLETE_REQUEST: {
code: 422,
message: 'Required parameter missing',
success: false,
},
};