mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 01:46:58 +01:00
Fixed types.
This commit is contained in:
parent
66d7a815fc
commit
e718b22599
@ -42,7 +42,7 @@ export default async (
|
||||
|
||||
if (req.method === 'GET') {
|
||||
if (await canViewAllWebsites(req.auth)) {
|
||||
const websites = getWebsites(req.query, {
|
||||
const websites = await getWebsites(req.query, {
|
||||
include: {
|
||||
teamWebsite: {
|
||||
include: {
|
||||
|
@ -21,7 +21,7 @@ export async function getWebsiteByShareId(shareId: string) {
|
||||
export async function getWebsites(
|
||||
filters: WebsiteSearchFilter,
|
||||
options?: { include?: Prisma.WebsiteInclude },
|
||||
): Promise<FilterResult<Website[]>> {
|
||||
): Promise<FilterResult<Website>> {
|
||||
const { userId, teamId, includeTeams, onlyTeams, query } = filters;
|
||||
const mode = prisma.getSearchMode();
|
||||
|
||||
@ -105,7 +105,7 @@ export async function getWebsites(
|
||||
export async function getWebsitesByUserId(
|
||||
userId: string,
|
||||
filters?: WebsiteSearchFilter,
|
||||
): Promise<FilterResult<Website[]>> {
|
||||
): Promise<FilterResult<Website>> {
|
||||
return getWebsites(
|
||||
{ userId, ...filters },
|
||||
{
|
||||
@ -133,7 +133,7 @@ export async function getWebsitesByUserId(
|
||||
export async function getWebsitesByTeamId(
|
||||
teamId: string,
|
||||
filters?: WebsiteSearchFilter,
|
||||
): Promise<FilterResult<Website[]>> {
|
||||
): Promise<FilterResult<Website>> {
|
||||
return getWebsites(
|
||||
{
|
||||
teamId,
|
||||
|
Loading…
Reference in New Issue
Block a user