mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
parent
acbb7e1b4a
commit
f9f41c67bf
4 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ export function validateNote(object: any, uri: string) {
|
|||
}
|
||||
|
||||
if (!validPost.includes(object.type)) {
|
||||
return new Error(`invalid Note: invalied object type ${object.type}`);
|
||||
return new Error(`invalid Note: invalid object type ${object.type}`);
|
||||
}
|
||||
|
||||
if (object.id && extractDbHost(object.id) !== expectHost) {
|
||||
|
|
|
@ -65,7 +65,7 @@ export async function resolveUser(username: string, host: string | null, option?
|
|||
// validate uri
|
||||
const uri = new URL(self.href);
|
||||
if (uri.hostname !== host) {
|
||||
throw new Error(`Invalied uri`);
|
||||
throw new Error(`Invalid uri`);
|
||||
}
|
||||
|
||||
await Users.update({
|
||||
|
|
|
@ -40,5 +40,5 @@ function genUrl(query: string) {
|
|||
return `https://${hostname}/.well-known/webfinger?` + urlQuery({ resource: `acct:${query}` });
|
||||
}
|
||||
|
||||
throw new Error(`Invalied query (${query})`);
|
||||
throw new Error(`Invalid query (${query})`);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ acct = acct.replace(/^@/, '');
|
|||
|
||||
// check args
|
||||
if (!acct.match(/^\w+@\w/)) {
|
||||
throw `Invalied acct format. Valied format are user@host`;
|
||||
throw `Invalid acct format. Valid format are user@host`;
|
||||
}
|
||||
|
||||
console.log(`resync ${acct}`);
|
||||
|
|
Loading…
Reference in a new issue