mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Refactored queries.
This commit is contained in:
parent
f36a689817
commit
8904b7b4ed
27 changed files with 137 additions and 144 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import { Prisma } from '@prisma/client';
|
||||
import prisma from 'lib/prisma';
|
||||
|
||||
export async function getSession(where: Prisma.SessionWhereUniqueInput) {
|
||||
export async function getSession(id: string) {
|
||||
return prisma.client.session.findUnique({
|
||||
where,
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { DATA_TYPE } from 'lib/constants';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import { flattenJSON } from 'lib/dynamicData';
|
||||
import { flattenJSON } from 'lib/data';
|
||||
import prisma from 'lib/prisma';
|
||||
import { DynamicData } from 'lib/types';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue