1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 09:58:13 +09:00

fix: theme-color

chore: fix margin
chore: update deps
This commit is contained in:
2021-07-30 15:53:42 +09:00
parent ba4949fe7b
commit 4343d0f633
13 changed files with 253 additions and 181 deletions

View File

@@ -1,10 +1,10 @@
import isURL from 'validator/lib/isURL';
import { send, sendError, fetch } from '../../../util/http';
import { NowRequest, NowResponse } from '@vercel/node';
import { VercelRequest, VercelResponse } from '@vercel/node';
export default async function handler(
req: NowRequest,
res: NowResponse
req: VercelRequest,
res: VercelResponse
): Promise<void> {
const { query } = req.query;
@@ -21,10 +21,9 @@ export default async function handler(
const availability = response.status === 404;
send(res, { availability });
} catch (err) {
console.log(err.code);
if (err.code === 'ENOTFOUND') {
if ((err as any).code === 'ENOTFOUND') {
return send(res, { availability: true });
}
sendError(res, err);
sendError(res, err as any);
}
}