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
-11
View File
@@ -4,7 +4,6 @@ import { db } from "../client.js";
import { projects } from "../schema/projects.js";
import type {
CreateProjectInput,
UpdateProjectSettingsInput,
} from "../../shared/validation/project-structure.schemas.js";
export class ProjectRepository {
@@ -30,16 +29,6 @@ export class ProjectRepository {
return row ?? null;
}
async updateSettings(projectId: string, input: UpdateProjectSettingsInput) {
await db
.update(projects)
.set({
singlePhaseVoltageV: input.singlePhaseVoltageV,
threePhaseVoltageV: input.threePhaseVoltageV,
})
.where(eq(projects.id, projectId));
}
async delete(projectId: string) {
await db.delete(projects).where(eq(projects.id, projectId));
}