Persist project settings updates
This commit is contained in:
parent
d00ae30bda
commit
b2763f72d5
21 changed files with 569 additions and 33 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue