mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 12:41:10 +10:00
fix: add no-prisma-delete lint
This commit is contained in:
@ -43,12 +43,12 @@ export default function createDBSessionHandler(): SessionProvider {
|
||||
},
|
||||
async removeSession(token) {
|
||||
await cache.remove(token);
|
||||
await prisma.session.delete({
|
||||
const { count } = await prisma.session.deleteMany({
|
||||
where: {
|
||||
token,
|
||||
},
|
||||
});
|
||||
return true;
|
||||
return count > 0;
|
||||
},
|
||||
async cleanupSessions() {
|
||||
const now = new Date();
|
||||
|
||||
Reference in New Issue
Block a user