Skip to content

Commit 5f5c39c

Browse files
Merge pull request #14 from khan9920/patch-1
GET/categories response re-restructured
2 parents 5ca6348 + 390bb0f commit 5f5c39c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/api/category/category.controller.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ export default class CategoryController {
3131
const result = await collection.find().toArray();
3232
res
3333
.status(httpStatus.CREATED)
34-
.send(result)
34+
.send({
35+
success: true,
36+
data: result,
37+
message: SuccessCodes.SUCCESSFULLY_DATA_RETRIVED
38+
})
3539
.end();
3640
} catch (e) {
3741
res.send(
@@ -159,4 +163,4 @@ export default class CategoryController {
159163
);
160164
}
161165
}
162-
}
166+
}

0 commit comments

Comments
 (0)