fix(api): return updated switch in PATCH /switches/:id

This commit is contained in:
spiral 2022-06-11 17:16:53 -04:00
parent 6ed066de29
commit 92ef6d4ec3
No known key found for this signature in database
GPG key ID: 244A11E4B0BCF40E
2 changed files with 4 additions and 3 deletions

View file

@ -183,7 +183,7 @@ public class SwitchControllerV2: PKControllerBase
if (await _repo.GetSwitches(system.Id).Select(x => x.Timestamp).ContainsAsync(value))
throw Errors.SameSwitchTimestampError;
await _repo.MoveSwitch(sw.Id, value);
sw = await _repo.MoveSwitch(sw.Id, value);
var members = await _db.Execute(conn => _repo.GetSwitchMembers(conn, sw.Id)).ToListAsync();
return Ok(new FrontersReturnNew