| Total Complexity | 0 |
| Complexity/F | 0 |
| Lines of Code | 27 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | 7 | export const HTTP_STATUS = { |
|
| 2 | OK: 200, |
||
| 3 | BAD_REQUEST: 400, |
||
| 4 | UNAUTHORIZED: 401, |
||
| 5 | FORBIDDEN: 403, |
||
| 6 | NOT_FOUND: 404, |
||
| 7 | } as const; |
||
| 8 | |||
| 9 | 7 | export const API_RESPONSES = { |
|
| 10 | AUTH_REQUIRED: { |
||
| 11 | status: HTTP_STATUS.UNAUTHORIZED, |
||
| 12 | description: 'Unauthorized. Authentication required', |
||
| 13 | }, |
||
| 14 | ADMIN_REQUIRED: { |
||
| 15 | status: HTTP_STATUS.FORBIDDEN, |
||
| 16 | description: 'Forbidden. Admin access required', |
||
| 17 | }, |
||
| 18 | NOT_FOUND: { |
||
| 19 | status: HTTP_STATUS.NOT_FOUND, |
||
| 20 | description: 'Resource not found', |
||
| 21 | }, |
||
| 22 | BAD_REQUEST: { |
||
| 23 | status: HTTP_STATUS.BAD_REQUEST, |
||
| 24 | description: 'Invalid input with error message', |
||
| 25 | }, |
||
| 26 | } as const; |
||
| 27 |