public async Task <HttpResponseMessage> Update(int id) { var body = await Request.Content.ReadAsStringAsync(); var context = new ContextImplement( sessionStatus: User?.Identity?.IsAuthenticated == true, sessionData: User?.Identity?.IsAuthenticated == true, apiRequestBody: body); var controller = new 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: User?.Identity?.IsAuthenticated == true, sessionData: User?.Identity?.IsAuthenticated == true, apiRequestBody: body); var controller = new Pleasanter.Controllers.Api.UsersController(); var result = controller.Update(context: context, id: id); return(result.ToHttpResponse(Request)); }