Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fix logoUrl

Brian Cao421d232cceb2
diff --git a/db/postgresql/schema.prisma b/db/postgresql/schema.prisma
index 8058281b8..2a791b66b 100644
--- a/db/postgresql/schema.prisma
+++ b/db/postgresql/schema.prisma
@@ -13,7 +13,7 @@ model User {
username String @unique @db.VarChar(255)
password String @db.VarChar(60)
role String @map("role") @db.VarChar(50)
- logoUrl String @map("logo_url") @db.VarChar(2183)
+ logoUrl String? @map("logo_url") @db.VarChar(2183)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
@@ -160,7 +160,7 @@ model Team {
id String @id() @unique() @map("team_id") @db.Uuid
name String @db.VarChar(50)
accessCode String? @unique @map("access_code") @db.VarChar(50)
- logoUrl String @map("logo_url") @db.VarChar(2183)
+ logoUrl String? @map("logo_url") @db.VarChar(2183)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @default(now()) @map("deleted_at") @db.Timestamptz(6)
diff --git a/src/queries/admin/team.ts b/src/queries/admin/team.ts
index 4af1dc972..532dea2c7 100644
--- a/src/queries/admin/team.ts
+++ b/src/queries/admin/team.ts
@@ -169,7 +169,7 @@ export async function getTeamsByUserId(
},
},
_count: {
- select: { website: true, teamUser: true },
+ select: { website: true, teamUser: { where: { user: { deletedAt: null } } } },
},
},
},