Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix building

Isaac82f4921038b4
diff --git a/apps/web/components/ui/Button.tsx b/apps/web/components/ui/button.tsx
similarity index 100%
rename from apps/web/components/ui/Button.tsx
rename to apps/web/components/ui/button.tsx
diff --git a/apps/web/lib/api/controllers/users/userId/getUserById.ts b/apps/web/lib/api/controllers/users/userId/getUserById.ts
index 45550523..5b56b4a4 100644
--- a/apps/web/lib/api/controllers/users/userId/getUserById.ts
+++ b/apps/web/lib/api/controllers/users/userId/getUserById.ts
@@ -1,5 +1,17 @@
import { prisma } from "@linkwarden/prisma";
-import { Subscription, User, WhitelistedUser } from "@linkwarden/prisma/client";
+import { Subscription, User } from "@linkwarden/prisma/client";
+
+type GetUserByIdResponse = Omit<User, "password"> &
+ Partial<{ subscription: Pick<Subscription, "active" | "quantity"> }> & {
+ parentSubscription: {
+ active: boolean | undefined;
+ user: {
+ email: string | null | undefined;
+ };
+ };
+ } & {
+ whitelistedUsers: string[];
+ }
export default async function getUserById(userId: number) {
const user = await prisma.user.findUnique({
@@ -32,12 +44,12 @@ export default async function getUserById(userId: number) {
const { password, subscriptions, parentSubscription, ...lessSensitiveInfo } =
user;
- const data = {
+ const data: GetUserByIdResponse = {
...lessSensitiveInfo,
whitelistedUsers: whitelistedUsernames,
subscription: {
- active: subscriptions?.active,
- quantity: subscriptions?.quantity,
+ active: subscriptions?.active ?? false,
+ quantity: subscriptions?.quantity ?? 0,
},
parentSubscription: {
active: parentSubscription?.active,
@@ -45,17 +57,7 @@ export default async function getUserById(userId: number) {
email: parentSubscription?.user.email,
},
},
- } as Omit<User, "password"> &
- Partial<{ subscription: Subscription }> & {
- parentSubscription: {
- active: boolean | undefined;
- user: {
- email: string | null | undefined;
- };
- };
- } & {
- whitelistedUsers: string[];
- };
+ }
return { response: data, status: 200 };
}
diff --git a/apps/web/package.json b/apps/web/package.json
index da32b4d7..e37ca89f 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -17,6 +17,7 @@
},
"dependencies": {
"@atlaskit/tree": "^8.8.7",
+ "@atlaskit/pragmatic-drag-and-drop": "^1.7.2",
"@auth/prisma-adapter": "^1.0.1",
"@headlessui/react": "^1.7.15",
"@linkwarden/filesystem": "*",
@@ -105,4 +106,4 @@
"tailwindcss": "^3.4.17",
"typescript": "4.9.4"
}
-}
+}
\ No newline at end of file