Remove snake_case.

This commit is contained in:
Brian Cao 2022-12-26 17:36:48 -08:00
parent e1f99a7d01
commit a91386434d
21 changed files with 86 additions and 100 deletions

View file

@ -10,9 +10,9 @@ export interface WebsiteEventDataRequestQuery {
}
export interface WebsiteEventDataRequestBody {
start_at: string;
end_at: string;
event_name: string;
startAt: string;
endAt: string;
eventName: string;
columns: { [key: string]: 'count' | 'max' | 'min' | 'avg' | 'sum' };
filters?: { [key: string]: any };
}
@ -34,10 +34,10 @@ export default async (
return unauthorized(res);
}
const { start_at, end_at, event_name: eventName, columns, filters } = req.body;
const { startAt, endAt, event_name: eventName, columns, filters } = req.body;
const startDate = new Date(+start_at);
const endDate = new Date(+end_at);
const startDate = new Date(+startAt);
const endDate = new Date(+endAt);
const events = await getEventData(websiteId, {
startDate,