mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Created cli command. Updated tracker script.
This commit is contained in:
parent
49a55b40b4
commit
a6975ecedd
9 changed files with 120 additions and 35 deletions
10
lib/web.js
10
lib/web.js
|
|
@ -8,3 +8,13 @@ export const post = (url, params) =>
|
|||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then(res => (res.status === 200 ? res.json() : null));
|
||||
|
||||
export const hook = (_this, method, callback) => {
|
||||
const orig = _this[method];
|
||||
|
||||
return (...args) => {
|
||||
callback.apply(null, args);
|
||||
|
||||
return orig.apply(_this, args);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue