diff --git a/controllers/auth/auth.js b/controllers/auth/auth.js index a1ce378..1519b58 100644 --- a/controllers/auth/auth.js +++ b/controllers/auth/auth.js @@ -821,6 +821,15 @@ export const registerStudentCSV = async (req, res) => { await transaction.commit(); + if (processed.length === 0) { + return response( + 400, + null, + "No students were registered. All entries are duplicates.", + res + ); + } + response( 200, {