mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 19:15:37 +01:00
feature(api): descriptive error for invalid domain names
This commit is contained in:
parent
c6c6ef1e8f
commit
a2f36e7ef2
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ export default async (req, res) => {
|
||||||
const { id, type, start_at, end_at, domain, url } = req.query;
|
const { id, type, start_at, end_at, domain, url } = req.query;
|
||||||
|
|
||||||
if (domain && !DOMAIN_REGEX.test(domain)) {
|
if (domain && !DOMAIN_REGEX.test(domain)) {
|
||||||
return badRequest(res);
|
return badRequest(res, 'error.bad-domain\tInvalid domain name - please check settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
const websiteId = +id;
|
const websiteId = +id;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue