fix: remove old user-keys

This commit is contained in:
MTG2000
2022-08-09 14:29:42 +03:00
parent 46e64ffec8
commit dd6a0f0021

View File

@@ -46,6 +46,11 @@ const loginHandler = async (req, res) => {
}
});
// Remove old linking for this key if existing
await prisma.userKey.delete({
where: { key }
})
return res
.status(200)
.json({ status: "OK" })