Persist project settings updates
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user