mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Collection API.
This commit is contained in:
parent
f7f0c05e12
commit
11f1afe5c3
9 changed files with 400 additions and 64 deletions
|
|
@ -4,7 +4,7 @@ import { savePageView } from '../../lib/db';
|
|||
export default async (req, res) => {
|
||||
const values = parseCollectRequest(req);
|
||||
|
||||
if (values) {
|
||||
if (values.valid) {
|
||||
const { type, session_id, url, referrer } = values;
|
||||
|
||||
if (type === 'pageview') {
|
||||
|
|
@ -12,5 +12,5 @@ export default async (req, res) => {
|
|||
}
|
||||
}
|
||||
|
||||
res.status(200).json({ status: 'ok' });
|
||||
res.status(200).json({ status: values.valid });
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue