misc: change default instance URL to lemdro.id
This commit is contained in:
119 files changed
+173
-188
No files matched your search
@@ -20,9 +20,6 @@ class SiteData {
|
||||
|
||||
export const site = new SiteData()
|
||||
|
||||
const isURL = (input: RequestInfo | URL): input is URL =>
|
||||
typeof input == 'object' && 'searchParams' in input
|
||||
|
||||
async function customFetch(
|
||||
func:
|
||||
| ((
|
||||
@@ -47,16 +44,6 @@ async function customFetch(
|
||||
}
|
||||
}
|
||||
|
||||
if (init?.body && auth) {
|
||||
try {
|
||||
const json = JSON.parse(init.body.toString())
|
||||
json.auth = auth
|
||||
init.body = JSON.stringify(json)
|
||||
} catch (e) {
|
||||
// It seems this isn't a JSON request. Ignore adding an auth parameter.
|
||||
}
|
||||
}
|
||||
|
||||
const res = await f(input, init)
|
||||
if (!res.ok) error(res.status, await res.text())
|
||||
return res
|
||||
|
||||
Reference in new issue
Block a user