mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 09:58:13 +09:00
fix: type errors
This commit is contained in:
@@ -20,10 +20,10 @@ export default async function handler(
|
||||
const response = await fetch(`https://${query}`);
|
||||
const availability = response.status === 404;
|
||||
send(res, { availability });
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
if ((err as any).code === 'ENOTFOUND') {
|
||||
return send(res, { availability: true });
|
||||
}
|
||||
sendError(res, err as any);
|
||||
sendError(res, err);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user