Autologin via ?hash=xxx parameter in url

This commit is contained in:
Dario Guarascio 2021-10-09 11:47:20 +02:00
parent 2575cbfc11
commit 6bd01aaa45
8 changed files with 64 additions and 4 deletions

View file

@ -223,6 +223,16 @@ export async function getAccountById(user_id) {
);
}
export async function getAccountByHash(hash) {
return runQuery(
prisma.account.findUnique({
where: {
hash,
},
}),
);
}
export async function getAccountByUsername(username) {
return runQuery(
prisma.account.findUnique({