Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Feb 21, 2024
1 parent 7cd779b commit 60560e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/api/admin/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
return;
}

const visitorId = fingerprintResult.data.products?.identification?.data?.visitorId;
const ip = fingerprintResult.data.products?.identification?.data?.ip;
const { visitorId, ip } = fingerprintResult.data.products?.identification?.data ?? {};
if (!visitorId) {
res.status(403).send({ severity: 'error', message: 'Visitor ID not found.' });
return;
Expand Down

0 comments on commit 60560e0

Please sign in to comment.