mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Remove snake_case.
This commit is contained in:
parent
e1f99a7d01
commit
a91386434d
21 changed files with 86 additions and 100 deletions
|
|
@ -10,12 +10,12 @@ const unitTypes = ['year', 'month', 'hour', 'day'];
|
|||
|
||||
export interface WebsiteEventsRequestQuery {
|
||||
id: string;
|
||||
start_at: string;
|
||||
end_at: string;
|
||||
startAt: string;
|
||||
endAt: string;
|
||||
unit: string;
|
||||
tz: string;
|
||||
url: string;
|
||||
event_name: string;
|
||||
eventName: string;
|
||||
}
|
||||
|
||||
export default async (
|
||||
|
|
@ -28,7 +28,7 @@ export default async (
|
|||
const {
|
||||
user: { id: userId },
|
||||
} = req.auth;
|
||||
const { id: websiteId, start_at, end_at, unit, tz, url, event_name } = req.query;
|
||||
const { id: websiteId, startAt, endAt, unit, tz, url, eventName } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
if (canViewWebsite(userId, websiteId)) {
|
||||
|
|
@ -38,8 +38,8 @@ export default async (
|
|||
if (!moment.tz.zone(tz) || !unitTypes.includes(unit)) {
|
||||
return badRequest(res);
|
||||
}
|
||||
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 getEventMetrics(websiteId, {
|
||||
startDate,
|
||||
|
|
@ -48,7 +48,7 @@ export default async (
|
|||
unit,
|
||||
filters: {
|
||||
url,
|
||||
eventName: event_name,
|
||||
eventName,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue