Skip to content

Commit 0ed0edf

Browse files
committed
fmt
1 parent c039a4a commit 0ed0edf

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

apps/web/app/(org)/dashboard/settings/organization/components/MembersCard.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@ export const MembersCard = ({
5252
return;
5353
}
5454

55+
if (!activeOrganization?.organization.id) {
56+
toast.error("Organization not found");
57+
return;
58+
}
59+
5560
try {
5661
await removeOrganizationInvite(
5762
inviteId,
58-
activeOrganization?.organization.id,
63+
activeOrganization.organization.id,
5964
);
6065
toast.success("Invite deleted successfully");
6166
router.refresh();

apps/web/app/api/changelog/status/route.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@ export async function GET(request: Request) {
2121
slug: parseInt(post.slug, 10),
2222
}))
2323
.sort((a, b) => b.slug - a.slug)
24-
.map(({ metadata, content }) => ({ ...metadata, content }));
24+
.map(({ metadata, content }) => ({ ...metadata, content }))
25+
.filter(
26+
(
27+
changelog,
28+
): changelog is {
29+
content: string;
30+
title: string;
31+
app: string;
32+
publishedAt: string;
33+
version: string;
34+
image?: string;
35+
} =>
36+
typeof changelog.title === "string" &&
37+
typeof changelog.app === "string" &&
38+
typeof changelog.publishedAt === "string" &&
39+
typeof changelog.version === "string",
40+
);
2541

2642
if (changelogs.length === 0) {
2743
return NextResponse.json({ hasUpdate: false });

packages/database/auth/auth-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export const authOptions = (): NextAuthOptions => {
153153
if (!session.user) return session;
154154

155155
if (token && token.id) {
156-
session.user.id = token.id;
156+
(session.user as { id: string }).id = token.id;
157157
session.user.name = token.name ?? null;
158158
session.user.email = token.email ?? null;
159159
session.user.image = token.picture ?? null;

0 commit comments

Comments
 (0)