mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-19 16:17:37 +03:00
Tidy up seting CloudClient#fetch
This commit is contained in:
parent
c094d7e1ee
commit
b7ac4cc41e
@ -67,12 +67,7 @@ interface EvaluatePromptParams {
|
||||
}
|
||||
|
||||
export class CloudClient {
|
||||
fetch: ((input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>) &
|
||||
((input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>);
|
||||
|
||||
constructor(fetch: typeof window.fetch = window.fetch) {
|
||||
this.fetch = fetch;
|
||||
}
|
||||
constructor(public fetch = window.fetch) {}
|
||||
|
||||
async createLoginToken(): Promise<LoginToken> {
|
||||
const response = await this.fetch(getUrl('login/token.json'), {
|
||||
|
Loading…
Reference in New Issue
Block a user