change property names

This commit is contained in:
Brian Cao 2022-10-10 10:45:05 -07:00
parent b69dfb366b
commit 2bd336d1c9
65 changed files with 293 additions and 298 deletions

View file

@ -8,10 +8,10 @@ export default async (req, res) => {
await useAuth(req, res);
if (req.method === 'GET') {
const { user_id } = req.auth;
const { userId } = req.auth;
const websites = await getUserWebsites(user_id);
const ids = websites.map(({ website_id }) => website_id);
const websites = await getUserWebsites(userId);
const ids = websites.map(({ id }) => id);
const token = createToken({ websites: ids }, secret());
const data = await getRealtimeData(ids, subMinutes(new Date(), 30));