api: move error context to matcher

This commit is contained in:
wukko
2024-08-24 16:56:07 +06:00
parent 37efa035a2
commit 7ac0726f37
13 changed files with 33 additions and 85 deletions

View File

@@ -22,12 +22,7 @@ export default async function(input) {
let { subdomain } = psl.parse(input.url.hostname);
if (subdomain?.includes('.')) {
return {
error: "link.unsupported",
context: {
service: "tumblr"
}
}
return { error: "link.unsupported" };
} else if (subdomain === 'www' || subdomain === 'at') {
subdomain = undefined
}