mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-28 11:34:24 +01:00
Merge branch 'dev' into feature/linking-accounts
This commit is contained in:
@@ -32,7 +32,6 @@ const loginHandler = async (req, res) => {
|
||||
algorithms: ['HS256'],
|
||||
})
|
||||
const user_id = payload.user_id;
|
||||
|
||||
const existingKeys = await prisma.userKey.findMany({ where: { user_id }, select: { key: true } });
|
||||
|
||||
if (existingKeys.length >= 3)
|
||||
@@ -47,7 +46,7 @@ const loginHandler = async (req, res) => {
|
||||
});
|
||||
|
||||
// Remove old linking for this key if existing
|
||||
await prisma.userKey.delete({
|
||||
await prisma.userKey.deleteMany({
|
||||
where: { key }
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user