mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Fix share URL permissions. (#1745)
* Fix share URL permissions. * Add sql param logic. * Add permissions to edit website. * Update permissions. * Move parameters to param injection. * Sanitize eventdata. * Remove caret. * Fix avg.
This commit is contained in:
parent
558ce268a0
commit
922c3acab3
16 changed files with 139 additions and 79 deletions
|
|
@ -17,8 +17,8 @@ async function relationalQuery(
|
|||
unit = 'day',
|
||||
filters = {},
|
||||
) {
|
||||
const { rawQuery, getDateQuery, getFilterQuery } = prisma;
|
||||
const params = [start_at, end_at];
|
||||
const { rawQuery, getDateQuery, getFilterQuery, toUuid } = prisma;
|
||||
const params = [websiteId, start_at, end_at];
|
||||
|
||||
return rawQuery(
|
||||
`select
|
||||
|
|
@ -28,8 +28,8 @@ async function relationalQuery(
|
|||
from event
|
||||
join website
|
||||
on event.website_id = website.website_id
|
||||
where website_uuid='${websiteId}'
|
||||
and event.created_at between $1 and $2
|
||||
where website_uuid = $1${toUuid()}
|
||||
and event.created_at between $2 and $3
|
||||
${getFilterQuery('event', filters, params)}
|
||||
group by 1, 2
|
||||
order by 2`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue