public async Task <ActionResult> DeleteAccommodationPicture(int pictureId, int tripId) { try { if (!await _editRightsService.HasEditRights(tripId)) { return(BadRequest(new JsonResult("You can't currently edit this trip."))); } await _accommodationService.DeleteAccommodationPicture(pictureId); await _editRightsService.ProlongEditRights(tripId, _redisAppSettings.EditRightsProlongedTTL); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }