mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
fix redis connection. fix delete account
This commit is contained in:
parent
12704c81e5
commit
afe6d8994b
3 changed files with 15 additions and 7 deletions
|
|
@ -4,12 +4,16 @@ import redis, { DELETED } from 'lib/redis';
|
|||
export async function deleteAccount(user_id) {
|
||||
const { client } = prisma;
|
||||
|
||||
const websiteUuids = await client.website
|
||||
.findMany({
|
||||
where: { user_id },
|
||||
select: { website_uuid: true },
|
||||
})
|
||||
.map(a => a.website_uuid);
|
||||
const websites = await client.website.findMany({
|
||||
where: { user_id },
|
||||
select: { website_uuid: true },
|
||||
});
|
||||
|
||||
let websiteUuids = [];
|
||||
|
||||
if (websites.length > 0) {
|
||||
websiteUuids = websites.map(a => a.website_uuid);
|
||||
}
|
||||
|
||||
return client
|
||||
.$transaction([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue