AnimateHeight for Info, error handling for the Osu Info (#4)

This commit is contained in:
Taevas 2024-05-01 19:12:02 +02:00
parent cca62c093f
commit dad037bed0
5 changed files with 88 additions and 82 deletions

View file

@ -13,19 +13,11 @@ const handler: Handler = async () => {
},
});
if (gitlab.status !== 200) {
return {
statusCode: 404,
body: "",
};
}
// eslint-disable-next-line @typescript-eslint/naming-convention
const {created_at} = (await gitlab.json() as Record<string, any>)[0];
if (typeof created_at !== "string") {
return {
statusCode: 404,
body: "",
};
}