Don't wipe out code slot names on restart

This commit is contained in:
Finn 2024-11-22 22:54:56 -08:00
parent cafbd63f98
commit 7077cf55fe
3 changed files with 29 additions and 5 deletions

View file

@ -145,7 +145,7 @@ func lockCodeEditHandler(c echo.Context) error {
return fmt.Errorf("error pushing code to lock %s (ZWaveDeviceID=%d ID=%d): %v", lock.Name, lock.ZwaveDeviceID, lock.ID, err)
}
err = queries.UpsertCodeSlot(ctx, db.UpsertCodeSlotParams{
err = queries.UpdateCodeSlot(ctx, db.UpdateCodeSlotParams{
Lock: lockID,
Slot: slot,
Code: newCode,