mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Initial Typescript models.
This commit is contained in:
parent
04e9f06e93
commit
0aaba8cbd1
74 changed files with 1144 additions and 768 deletions
|
|
@ -1,23 +0,0 @@
|
|||
import prisma from 'lib/prisma';
|
||||
import cache from 'lib/cache';
|
||||
|
||||
export async function createWebsite(userId, data) {
|
||||
return prisma.client.website
|
||||
.create({
|
||||
data: {
|
||||
user: {
|
||||
connect: {
|
||||
id: userId,
|
||||
},
|
||||
},
|
||||
...data,
|
||||
},
|
||||
})
|
||||
.then(async data => {
|
||||
if (cache.enabled) {
|
||||
await cache.storeWebsite(data);
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue