mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Added option to exclude hash.
This commit is contained in:
parent
2d2733387d
commit
4ddf8d0d56
2 changed files with 13 additions and 10 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
methodNotAllowed,
|
||||
ok,
|
||||
safeDecodeURI,
|
||||
send,
|
||||
} from 'next-basics';
|
||||
import { COLLECTION_TYPE, HOSTNAME_REGEX, IP_REGEX } from 'lib/constants';
|
||||
import { secret, visitSalt, uuid } from 'lib/crypto';
|
||||
|
|
@ -103,7 +102,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
|||
|
||||
const session = req.session;
|
||||
|
||||
if (!session?.id) {
|
||||
if (!session?.id || !session?.websiteId) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -162,9 +161,9 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
|||
});
|
||||
}
|
||||
|
||||
const token = createToken(session, secret());
|
||||
const cache = createToken(session, secret());
|
||||
|
||||
return send(res, token);
|
||||
return ok(res, { cache });
|
||||
}
|
||||
|
||||
return methodNotAllowed(res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue