Skip to content

Commit

Permalink
refactor(types): server configuration types
Browse files Browse the repository at this point in the history
add types to ape client (#4786)
  • Loading branch information
Miodec committed Feb 7, 2024
1 parent 15af21c commit 315b7f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/ts/ape/endpoints/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
2 changes: 1 addition & 1 deletion frontend/src/ts/ape/server-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 315b7f7

Please sign in to comment.