|
6 | 6 | getTrackedProgressDocuments,
|
7 | 7 | } = require("../models/monitor");
|
8 | 8 | const { RESPONSE_MESSAGES } = require("../constants/monitor");
|
9 |
| -const { RESOURCE_CREATED_SUCCEEDED, RESOURCE_UPDATED_SUCCEEDED, RESOURCE_RETRIEVAL_SUCCEEDED } = RESPONSE_MESSAGES; |
| 9 | +const { RESOURCE_CREATED_SUCCESSFULLY, RESOURCE_UPDATED_SUCCESSFULLY, RESOURCE_RETRIEVED_SUCCESSFULLY } = |
| 10 | + RESPONSE_MESSAGES; |
10 | 11 | /**
|
11 | 12 | * @typedef {Object} TrackedProgressRequestBody
|
12 | 13 | * @property {string} type - The type of tracked progress ("user" or "task").
|
@@ -46,7 +47,7 @@ const createTrackedProgressController = async (req, res) => {
|
46 | 47 | try {
|
47 | 48 | const data = await createTrackedProgressDocument({ ...req.body });
|
48 | 49 | return res.status(201).json({
|
49 |
| - message: RESOURCE_CREATED_SUCCEEDED, |
| 50 | + message: RESOURCE_CREATED_SUCCESSFULLY, |
50 | 51 | data,
|
51 | 52 | });
|
52 | 53 | } catch (error) {
|
@@ -109,7 +110,7 @@ const updateTrackedProgressController = async (req, res) => {
|
109 | 110 | const data = await updateTrackedProgressDocument({ ...req });
|
110 | 111 | return res.status(200).json({
|
111 | 112 | data,
|
112 |
| - message: RESOURCE_UPDATED_SUCCEEDED, |
| 113 | + message: RESOURCE_UPDATED_SUCCESSFULLY, |
113 | 114 | });
|
114 | 115 | } catch (error) {
|
115 | 116 | if (error instanceof NotFound) {
|
@@ -161,7 +162,7 @@ const getTrackedProgressController = async (req, res) => {
|
161 | 162 | try {
|
162 | 163 | const data = await getTrackedProgressDocuments({ ...req.query });
|
163 | 164 | return res.status(200).json({
|
164 |
| - message: RESOURCE_RETRIEVAL_SUCCEEDED, |
| 165 | + message: RESOURCE_RETRIEVED_SUCCESSFULLY, |
165 | 166 | data,
|
166 | 167 | });
|
167 | 168 | } catch (error) {
|
|
0 commit comments