mirror of
https://github.com/imputnet/cobalt.git
synced 2026-02-06 05:56:59 +00:00
api: move error context to matcher
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user