mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 12:48:01 +02:00
fix: use getJson rather than calling fetch directly for getJsonAuth
closes #175
This commit is contained in:
parent
2c20ac430d
commit
db164b09ac
1 changed files with 2 additions and 6 deletions
|
@ -55,12 +55,8 @@ export async function getJsonHyp(path) {
|
|||
|
||||
export async function getJsonAuth(path, opts = {}) {
|
||||
const root = useStore().getItem('authapi') || PIPED_INSTANCE;
|
||||
|
||||
return await fetch('https://' + root + path, opts)
|
||||
.then(res => res.json())
|
||||
.catch(err => {
|
||||
useAlert().add(err);
|
||||
});
|
||||
|
||||
return await getJson('https://' + root + path, opts);
|
||||
}
|
||||
|
||||
function useAuthToken() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue