Added year option.

This commit is contained in:
Mike Cao 2020-07-30 23:08:33 -07:00
parent 38abd673f3
commit 5b45301178
4 changed files with 18 additions and 2 deletions

View file

@ -7,7 +7,7 @@ export default async (req, res) => {
const { id, start_at, end_at, unit, tz } = req.query;
if (!moment.tz.zone(tz) || !['hour', 'day'].includes(unit)) {
if (!moment.tz.zone(tz) || !['month', 'hour', 'day'].includes(unit)) {
return res.status(400).end();
}