Refactored useApi usage.

This commit is contained in:
Mike Cao 2022-12-27 20:20:44 -08:00
parent 561cde6e7e
commit cad0b73e42
26 changed files with 67 additions and 85 deletions

View file

@ -4,7 +4,7 @@ import ipaddr from 'ipaddr.js';
import { createToken, unauthorized, send, badRequest, forbidden } from 'next-basics';
import { savePageView, saveEvent } from 'queries';
import { useCors, useSession } from 'lib/middleware';
import { getJsonBody, getIpAddress } from 'lib/request';
import { getJsonBody, getIpAddress } from 'lib/detect';
import { secret } from 'lib/crypto';
import { NextApiRequest, NextApiResponse } from 'next';