on/off add

This commit is contained in:
2024-03-06 01:06:40 +03:00
parent c55b16d259
commit 494675c567
8 changed files with 155 additions and 54 deletions

View File

@@ -63,13 +63,10 @@ const save = async (
return "IP Adresi güncellendi";
}
} catch (error) {
// if (error.code === 11000) {
// throw new Error("Zaten kaydedilmiş");
// }
throw new Error("Mongodb'ye kaydedilirken hata oluştu");
throw new Error("Mongodb: " + error.message + " (save.controller)");
}
} else {
throw new Error("Hatalı token");
throw new Error("Hatalı token (save.controller)");
}
};