try catch

This commit is contained in:
Felix Ableitner 2024-11-26 13:23:19 +01:00
parent f6840c8298
commit 7d0f136cb7

View file

@ -207,7 +207,10 @@ async function allowInstance(api: LemmyHttp, instance: string) {
allow: true,
reason: undefined,
};
await api.adminAllowInstance(params);
// Ignore errors from duplicate allows (because setup gets called for each test file)
try {
await api.adminAllowInstance(params);
} catch {}
}
export async function createPost(