Skip to content

Commit

Permalink
fix usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
briancao authored and franciscao633 committed May 15, 2024
1 parent c80be88 commit 4b421d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/api/users/[userId]/usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { getAllUserWebsitesIncludingTeamOwner, getEventDataUsage, getEventUsage
import * as yup from 'yup';

export interface UserUsageRequestQuery {
id: string;
params: { startAt: string; endAt: string };
userId: string;
startAt: string;
endAt: string;
}

export interface UserUsageRequestResponse {
Expand Down Expand Up @@ -44,7 +45,7 @@ export default async (
return unauthorized(res);
}

const { id: userId, startAt, endAt } = req.query;
const { userId, startAt, endAt } = req.query;

const startDate = new Date(+startAt);
const endDate = new Date(+endAt);
Expand Down

0 comments on commit 4b421d0

Please sign in to comment.