The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix passport disabled state

Luna d3eea345 c6736a03

+4 -4
+1 -1
app/passport/[guildId]/api.ts
··· 1 1 import { ApiError, ApiV1GuildsModulesPassportGetResponse } from "@/typings"; 2 2 3 - export async function getPassport(guildId: string): Promise<ApiV1GuildsModulesPassportGetResponse | ApiError | undefined> { 3 + export async function getPassport(guildId: string): Promise<ApiV1GuildsModulesPassportGetResponse | true | ApiError | undefined> { 4 4 const res = await fetch(`${process.env.NEXT_PUBLIC_API}/guilds/${guildId}/passport-verification`, { 5 5 headers: { Authorization: process.env.API_SECRET as string }, 6 6 next: { revalidate: 60 }
+3 -3
app/passport/[guildId]/page.tsx
··· 62 62 63 63 const guildExists = guild && "id" in guild; 64 64 65 - const backgroundRgb = passport && "backgroundColor" in passport && passport.backgroundColor 65 + const backgroundRgb = typeof passport === "object" && "backgroundColor" in passport && passport.backgroundColor 66 66 ? decimalToRgb(passport.backgroundColor || 0) 67 67 : undefined; 68 68 ··· 79 79 </style> 80 80 } 81 81 82 - {passport && "message" in passport && 82 + {typeof passport === "object" && "message" in passport && 83 83 <Notice type={NoticeType.Error} message={passport.message} /> 84 84 } 85 85 ··· 152 152 153 153 { 154 154 guild && "id" in guild && 155 - passport && "enabled" in passport && 155 + passport === true && 156 156 <Verify 157 157 guild={guild} 158 158 />