[all] Remove more "now" references (#5944)

Follow up to #5928 to remove a few more "now" references and replace with "vercel" where appropriate.
This commit is contained in:
Steven
2021-03-08 10:08:09 -05:00
committed by GitHub
parent c0d22cf78d
commit f5f07c5d15
78 changed files with 264 additions and 1080 deletions

View File

@@ -1,10 +1,10 @@
import { NowRequest, NowResponse } from '@vercel/node';
import { VercelRequest, VercelResponse } from '@vercel/node';
import { errorHandler } from './error-handler';
type Handler = (req: NowRequest, res: NowResponse) => Promise<any>;
type Handler = (req: VercelRequest, res: VercelResponse) => Promise<any>;
export function withApiHandler(handler: Handler): Handler {
return async (req: NowRequest, res: NowResponse) => {
return async (req: VercelRequest, res: VercelResponse) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET');
res.setHeader(