Refactor for clarity and correctness, add JS docs
This commit is contained in:
1 parent
e0e80dc9c7
commit
c1d1e0ad1d
7 files changed
+180
-218
No files matched your search
@@ -13,7 +13,7 @@ const errorMessages = {
|
||||
NO_AUTH_TOKEN: "No auth token provided",
|
||||
INVALID_AUTH_TOKEN: "Invalid auth token",
|
||||
|
||||
//Onwership Middleware
|
||||
//Ownership Middleware
|
||||
VERIFY_OWNER_NOT_FOUND: "Document not found",
|
||||
VERIFY_OWNER_UNAUTHORIZED: "Unauthorized access",
|
||||
|
||||
@@ -26,17 +26,16 @@ const errorMessages = {
|
||||
DB_TOKEN_NOT_FOUND: "Token not found",
|
||||
DB_RESET_PASSWORD_BAD_MATCH:
|
||||
"New password must be different from old password",
|
||||
DB_FIND_MONTIOR_BY_ID: (monitorId) =>
|
||||
DB_FIND_MONITOR_BY_ID: (monitorId) =>
|
||||
`Monitor with id ${monitorId} not found`,
|
||||
DB_DELETE_CHECKS: (monitorId) =>
|
||||
`No checks found for monitor with id ${monitorId}`,
|
||||
DB_DELETE_ALERT: (alertId) => `Alert with id ${alertId} not found`,
|
||||
|
||||
//Auth errors
|
||||
AUTH_INCORRECT_PASSWORD: "Incorrect password",
|
||||
AUTH_UNAUTHORIZED: "Unauthorized access",
|
||||
|
||||
// Monitor Errros
|
||||
// Monitor Errors
|
||||
MONITOR_GET_BY_ID: "Monitor not found",
|
||||
MONITOR_GET_BY_USER_ID: "No monitors found for user",
|
||||
|
||||
@@ -77,8 +76,8 @@ const successMessages = {
|
||||
|
||||
//Monitor Controller
|
||||
MONITOR_GET_ALL: "Got all monitors successfully",
|
||||
MONTIOR_STATS_BY_ID: "Got monitor stats by Id successfully",
|
||||
MONTIOR_GET_BY_ID: "Got monitor by Id successfully",
|
||||
MONITOR_STATS_BY_ID: "Got monitor stats by Id successfully",
|
||||
MONITOR_GET_BY_ID: "Got monitor by Id successfully",
|
||||
MONITOR_GET_BY_USER_ID: (userId) => `Got monitor for ${userId} successfully"`,
|
||||
MONITOR_CREATE: "Monitor created successfully",
|
||||
MONITOR_DELETE: "Monitor deleted successfully",
|
||||
@@ -94,7 +93,7 @@ const successMessages = {
|
||||
|
||||
//Maintenance Window Controller
|
||||
MAINTENANCE_WINDOW_CREATE: "Maintenance Window created successfully",
|
||||
MAINTEANCE_WINDOW_GET_BY_USER: "Got Maintenance Windows by User successfully",
|
||||
MAINTENANCE_WINDOW_GET_BY_USER: "Got Maintenance Windows by User successfully",
|
||||
|
||||
//Ping Operations
|
||||
PING_SUCCESS: "Success",
|
||||
|
||||
Reference in new issue
Block a user