Fix 401 on share url.

This commit is contained in:
Mike Cao 2020-09-14 08:46:35 -07:00
parent 38ec91c48e
commit 5b4a012f0b
8 changed files with 7 additions and 18 deletions

View file

@ -1,13 +1,10 @@
import moment from 'moment-timezone';
import { getEvents } from 'lib/queries';
import { ok, badRequest, methodNotAllowed } from 'lib/response';
import { useAuth } from 'lib/middleware';
const unitTypes = ['year', 'month', 'hour', 'day'];
export default async (req, res) => {
await useAuth(req, res);
if (req.method === 'GET') {
const { id, start_at, end_at, unit, tz } = req.query;