public HttpResponseMessage createList(updateMember updateItem) { var result = new { //data = placeArray }; return(Request.CreateResponse(HttpStatusCode.OK, result)); }
public HttpResponseMessage updateMember(updateMember updateItem) { var userModel = db.users.FirstOrDefault(u => u.email == updateItem.email); var result = new { status = 0, msg = "fail" }; if (userModel != null) { userModel.name = updateItem.name; userModel.password = updateItem.password; userModel.authority = updateItem.authority; userModel.updated = DateTime.Now; db.SaveChanges(); result = new { status = 1, msg = "OK" }; } return(Request.CreateResponse(HttpStatusCode.OK, result)); }