MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/backend-group-lessons / getAllClass

Function getAllClass

controller/classController.js:131–147  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

129
130// Get all class
131const getAllClass = async (req, res) => {
132 try {
133 const classes = await Class.find({});
134 res.json({
135 succes: true,
136 message: "Uquvchilar royhati",
137 classes,
138 });
139 }
140 catch (error) {
141 console.log(error);
142 res.status(500).json({
143 succes: false,
144 message: error.message,
145 });
146 }
147}
148
149// getClasById
150const GetClassById = async (req, res) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected