Exemplo n.º 1
0
        public async Task <HttpResponseMessage> Update(int id)
        {
            var body = await Request.Content.ReadAsStringAsync();

            var context    = new ContextImplement(sessionStatus: false, sessionData: false, apiRequestBody: body);
            var controller = new Implem.Pleasanter.Controllers.Api.UsersController();
            var result     = controller.Update(context: context, id: id);

            return(result.ToHttpResponse(Request));
        }
        public ContentResult Update(int id)
        {
            var body = default(string);

            using (var reader = new StreamReader(Request.Body)) body = reader.ReadToEnd();
            var context    = new ContextImplement(sessionStatus: false, sessionData: false, apiRequestBody: body);
            var controller = new Implem.Pleasanter.Controllers.Api.UsersController();
            var result     = controller.Update(context: context, id: id);

            return(result.ToHttpResponse(Request));
        }