Persist project settings updates

This commit is contained in:
2026-07-25 23:08:07 +02:00
parent d00ae30bda
commit b2763f72d5
21 changed files with 569 additions and 33 deletions
+8 -3
View File
@@ -15,6 +15,7 @@ import type {
ProjectRevisionPageDto,
ProjectSnapshotMetadataDto,
ProjectSnapshotRestoreResultDto,
ProjectSettingsCommandResultDto,
ProjectDeviceSyncCommandResultDto,
ProjectDeviceSyncPreviewDto,
ProjectDto,
@@ -205,12 +206,16 @@ export function createProject(name: string) {
export function updateProjectSettings(
projectId: string,
expectedRevision: number,
input: { singlePhaseVoltageV: number; threePhaseVoltageV: number }
) {
return request<ProjectDto>(`/api/projects/${projectId}`, {
return request<ProjectSettingsCommandResultDto>(
`/api/projects/${projectId}`,
{
method: "PUT",
body: JSON.stringify(input),
});
body: JSON.stringify({ expectedRevision, ...input }),
}
);
}
export function listDistributionBoards(projectId: string) {