huskies: merge 567_story_gateway_ui_project_management_add_and_remove_projects

This commit is contained in:
dave
2026-04-15 18:02:47 +00:00
parent d235fd41ac
commit beb84ade9f
3 changed files with 352 additions and 27 deletions
+16
View File
@@ -86,4 +86,20 @@ export const gatewayApi = {
getGatewayInfo(): Promise<GatewayInfo> {
return gatewayRequest<GatewayInfo>("/api/gateway");
},
/// Add a new project to the gateway config.
addProject(name: string, url: string): Promise<GatewayProject> {
return gatewayRequest<GatewayProject>("/api/gateway/projects", {
method: "POST",
body: JSON.stringify({ name, url }),
});
},
/// Remove a project from the gateway config.
removeProject(name: string): Promise<void> {
return gatewayRequest<void>(
`/api/gateway/projects/${encodeURIComponent(name)}`,
{ method: "DELETE" },
);
},
};