remove logs in domain middleware

This commit is contained in:
Joshua 2022-09-19 22:20:21 +02:00
parent 36d9daca52
commit d175fe601a

View file

@ -3,11 +3,9 @@ interface RequestParameters { r: pogo.Request, h: pogo.Toolkit }
export default ({ r, h }: RequestParameters, domains: string[] | string, handler: any) => {
if (domains.includes(r.host) || domains.includes("*")) {
console.log("Call actual Handler")
return handler(r, h)
} else {
console.log("Throw Error")
return h.response({
error: "This Site/Fuction doesn't exist or is not available on the current domain."
}).code(404)