mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-24 23:07:25 +08:00
refactor(types): server configuration types
add types to ape client (#4786)
This commit is contained in:
parent
15af21cbf3
commit
315b7f70bb
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ export default class Root {
|
|||
this.httpClient = httpClient;
|
||||
}
|
||||
|
||||
async get(): Ape.EndpointResponse {
|
||||
async get(): Ape.EndpointResponse<SharedTypes.Configuration> {
|
||||
return await this.httpClient.get("/configuration");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ export async function sync(): Promise<void> {
|
|||
console.error("Could not fetch configuration", response.message);
|
||||
return;
|
||||
} else {
|
||||
config = response.data as SharedTypes.Configuration;
|
||||
config = response.data ?? undefined;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue