public void Edit(long flagId, [FromBody] Frapid.Config.Entities.Flag flag) { if (flag == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { flag.UserId = this._UserId; flag.FlaggedOn = System.DateTime.UtcNow; this.FlagRepository.Update(flag, flagId); } catch (UnauthorizedException) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden)); } catch { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
public void Last() { Frapid.Config.Entities.Flag flag = Fixture().GetLast(); Assert.NotNull(flag); }
public void Previous() { Frapid.Config.Entities.Flag flag = Fixture().GetPrevious(0); Assert.NotNull(flag); }