mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
redis checkpoint
This commit is contained in:
parent
10cc6616c5
commit
818f8721e9
10 changed files with 187 additions and 34 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { prisma, runQuery } from 'lib/relational';
|
||||
import redis from 'lib/redis';
|
||||
|
||||
export async function createWebsite(user_id, data) {
|
||||
return runQuery(
|
||||
|
|
@ -12,5 +13,11 @@ export async function createWebsite(user_id, data) {
|
|||
...data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
).then(async res => {
|
||||
if (process.env.REDIS_URL) {
|
||||
await redis.set(`website:${res.website_uuid}`, Number(res.website_id));
|
||||
}
|
||||
|
||||
return res;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue