mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
refactor
This commit is contained in:
parent
508af8d458
commit
6caec5b8e2
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ export class LdSignature {
|
||||||
} as {
|
} as {
|
||||||
type: string;
|
type: string;
|
||||||
creator: string;
|
creator: string;
|
||||||
domain: string;
|
domain?: string;
|
||||||
nonce: string;
|
nonce: string;
|
||||||
created: string;
|
created: string;
|
||||||
};
|
};
|
||||||
|
@ -114,7 +114,7 @@ export class LdSignature {
|
||||||
Accept: 'application/ld+json, application/json',
|
Accept: 'application/ld+json, application/json',
|
||||||
},
|
},
|
||||||
timeout: this.loderTimeout,
|
timeout: this.loderTimeout,
|
||||||
agent: u => u.protocol == 'http:' ? httpAgent : httpsAgent,
|
agent: u => u.protocol === 'http:' ? httpAgent : httpsAgent,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
throw `${res.status} ${res.statusText}`;
|
throw `${res.status} ${res.statusText}`;
|
||||||
|
|
Loading…
Reference in a new issue