mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Updated pixel/link endpoints. Added name to rawQuery.
This commit is contained in:
parent
b9fbbc6453
commit
8a977b0164
18 changed files with 913 additions and 810 deletions
|
|
@ -206,9 +206,10 @@ async function pagedRawQuery(
|
|||
async function rawQuery<T = unknown>(
|
||||
query: string,
|
||||
params: Record<string, unknown> = {},
|
||||
name?: string,
|
||||
): Promise<T> {
|
||||
if (process.env.LOG_QUERY) {
|
||||
log({ query, params });
|
||||
log({ query, params, name });
|
||||
}
|
||||
|
||||
await connect();
|
||||
|
|
|
|||
|
|
@ -164,10 +164,11 @@ function parseFilters(filters: Record<string, any>, options?: QueryOptions) {
|
|||
};
|
||||
}
|
||||
|
||||
async function rawQuery(sql: string, data: object): Promise<any> {
|
||||
async function rawQuery(sql: string, data: Record<string, any>, name?: string): Promise<any> {
|
||||
if (process.env.LOG_QUERY) {
|
||||
log('QUERY:\n', sql);
|
||||
log('PARAMETERS:\n', data);
|
||||
log('NAME:\n', name);
|
||||
}
|
||||
const params = [];
|
||||
const schema = getSchema();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue