Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
 public void Last()
 {
     Frapid.Config.Entities.Flag flag = Fixture().GetLast();
     Assert.NotNull(flag);
 }
Ejemplo n.º 3
0
 public void Previous()
 {
     Frapid.Config.Entities.Flag flag = Fixture().GetPrevious(0);
     Assert.NotNull(flag);
 }