chore: enable noUncheckedIndexedAccess, better type check (#2608)
This commit is contained in:
@@ -73,7 +73,7 @@ export const getTokenFromCookie = (cookie: string) => {
|
||||
.reduce(
|
||||
(acc, item) => {
|
||||
const [key, value] = item.split("=")
|
||||
acc[key] = value
|
||||
acc[key!] = value!
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, string>,
|
||||
|
||||
@@ -21,16 +21,16 @@ export const ogRoute = (app: FastifyInstance) => {
|
||||
|
||||
switch (type) {
|
||||
case "feed": {
|
||||
imageRes = await renderFeedOG(apiClient, id).catch(errorFallback)
|
||||
imageRes = await renderFeedOG(apiClient, id!).catch(errorFallback)
|
||||
|
||||
break
|
||||
}
|
||||
case "user": {
|
||||
imageRes = await renderUserOG(apiClient, id).catch(errorFallback)
|
||||
imageRes = await renderUserOG(apiClient, id!).catch(errorFallback)
|
||||
break
|
||||
}
|
||||
case "list": {
|
||||
imageRes = await renderListOG(apiClient, id).catch(errorFallback)
|
||||
imageRes = await renderListOG(apiClient, id!).catch(errorFallback)
|
||||
break
|
||||
}
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user