add op.js to public site

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-05 22:39:22 +01:00
parent 2c20c1e3df
commit a92ce66048
10 changed files with 28 additions and 5 deletions

View File

@@ -41,11 +41,11 @@ function createApi(_url: string, clientId: string, clientSecret?: string) {
...(options ?? {}),
})
.then(async (res) => {
if (res.status !== 200) {
if (res.status !== 200 && res.status !== 202) {
return retry(attempt, resolve);
}
const response = await res.json();
const response = await res.text();
if (!response) {
return resolve(null);