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 (req.method === 'GET') {
|
||||||
if (await canViewAllWebsites(req.auth)) {
|
if (await canViewAllWebsites(req.auth)) {
|
||||||
const websites = getWebsites(req.query, {
|
const websites = await getWebsites(req.query, {
|
||||||
include: {
|
include: {
|
||||||
teamWebsite: {
|
teamWebsite: {
|
||||||
include: {
|
include: {
|
||||||
|
@ -21,7 +21,7 @@ export async function getWebsiteByShareId(shareId: string) {
|
|||||||
export async function getWebsites(
|
export async function getWebsites(
|
||||||
filters: WebsiteSearchFilter,
|
filters: WebsiteSearchFilter,
|
||||||
options?: { include?: Prisma.WebsiteInclude },
|
options?: { include?: Prisma.WebsiteInclude },
|
||||||
): Promise<FilterResult<Website[]>> {
|
): Promise<FilterResult<Website>> {
|
||||||
const { userId, teamId, includeTeams, onlyTeams, query } = filters;
|
const { userId, teamId, includeTeams, onlyTeams, query } = filters;
|
||||||
const mode = prisma.getSearchMode();
|
const mode = prisma.getSearchMode();
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ export async function getWebsites(
|
|||||||
export async function getWebsitesByUserId(
|
export async function getWebsitesByUserId(
|
||||||
userId: string,
|
userId: string,
|
||||||
filters?: WebsiteSearchFilter,
|
filters?: WebsiteSearchFilter,
|
||||||
): Promise<FilterResult<Website[]>> {
|
): Promise<FilterResult<Website>> {
|
||||||
return getWebsites(
|
return getWebsites(
|
||||||
{ userId, ...filters },
|
{ userId, ...filters },
|
||||||
{
|
{
|
||||||
@ -133,7 +133,7 @@ export async function getWebsitesByUserId(
|
|||||||
export async function getWebsitesByTeamId(
|
export async function getWebsitesByTeamId(
|
||||||
teamId: string,
|
teamId: string,
|
||||||
filters?: WebsiteSearchFilter,
|
filters?: WebsiteSearchFilter,
|
||||||
): Promise<FilterResult<Website[]>> {
|
): Promise<FilterResult<Website>> {
|
||||||
return getWebsites(
|
return getWebsites(
|
||||||
{
|
{
|
||||||
teamId,
|
teamId,
|
||||||
|
Loading…
Reference in New Issue
Block a user