mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Update website fetch and update.
This commit is contained in:
parent
05245ca316
commit
1075325ec5
5 changed files with 27 additions and 59 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import prisma from 'lib/prisma';
|
||||
|
||||
export async function getUserWebsites(where) {
|
||||
export async function getUserWebsites(userId) {
|
||||
return prisma.client.website.findMany({
|
||||
where,
|
||||
where: {
|
||||
userId,
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import prisma from 'lib/prisma';
|
||||
|
||||
export async function updateWebsite(data, where) {
|
||||
export async function updateWebsite(id, data) {
|
||||
return prisma.client.website.update({
|
||||
where,
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue