mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 01:48:12 +09:00
fix: tsc errors
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { NowRequest, NowResponse } from '@vercel/node';
|
||||
import assert from 'assert';
|
||||
import fetch from 'cross-fetch';
|
||||
import { send, sendError } from '../../../util/http';
|
||||
|
||||
@@ -8,6 +9,8 @@ export default async function handler(
|
||||
): Promise<void> {
|
||||
const { query } = req.query;
|
||||
|
||||
assert(process.env.DOMAINR_API_KEY);
|
||||
|
||||
if (!query || typeof query !== 'string') {
|
||||
return sendError(res, new Error('No query given'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user