File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
(org)/dashboard/settings/organization/components Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff 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 ( ) ;
Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments