refactor: rewrite ke codebase lama

This commit is contained in:
Muhammad Zhafran Ilham
2026-06-07 20:17:49 +07:00
parent ce5487dcbf
commit fe74b2213d
146 changed files with 14608 additions and 6686 deletions
+21
View File
@@ -0,0 +1,21 @@
const mahasiswaModel = require("../models/mahasiswa");
const getAllMahasiswa = async (req, res) => {
try {
const [result] = await mahasiswaModel.getAllMahasiswa();
res.status(200).json({
message: "Student data retrieved successfully",
data: result,
});
} catch (error) {
console.error("Error fetching all students:", error);
res.status(500).json({
message: "Internal server error",
error: error.message,
});
}
};
module.exports = {
getAllMahasiswa,
};