public async Task <ActionResult <SafeLocationModel> > UpdateSafeLocationAsync([FromRoute] Guid locationId, [FromBody] SafeLocationRequest safeLocation) { var sub = User.Claims.FirstOrDefault(c => c.Type == "sub")?.Value; var query = new UpdateSafeLocation(sub, locationId, safeLocation); var result = await _mediator.Send(query); if (result.IsFailure) { return(BadRequest()); } return(Ok(result.Value)); }
public AddSafeLocation(string userSub, Guid groupId, SafeLocationRequest safeLocation) { UserSub = userSub; GroupId = groupId; SafeLocation = safeLocation; }
public async Task <ActionResult <SafeLocationModel> > UpdateSafeLocationAsync([FromRoute] Guid groupId, [FromRoute] Guid locationId, [FromBody] SafeLocationRequest safeLocation) { throw new NotImplementedException(); }
public UpdateSafeLocation(string userSub, Guid safeLocationId, SafeLocationRequest safeLocation) { UserSub = userSub; SafeLocationId = safeLocationId; SafeLocation = safeLocation; }