public HttpResponseMessage unsubscribe(UnsubscribeCO cO) { int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name); Response response = TheDataStore.unsubscribeToClassRoom(userId, cO.classRoomName); return(TheDataStore.makeHttpResponseMessage(response, cO.requestObject, Request, userId)); }
public HttpResponseMessage changeDoneState(ChangeDoneStateCO cO) { int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name); Response response = TheDataStore.changeDoneState(cO.assignmentId, cO.currentDoneState, userId); return(TheDataStore.makeHttpResponseMessage(response, cO.requestObject, Request, userId)); }
public HttpResponseMessage create(CreateAssignmentCO cO) { int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name); Response response = TheDataStore.createAssignment(cO.newName, cO.classRoomName, cO.newDueDateTicks, cO.newDescription); return(TheDataStore.makeHttpResponseMessage(response, cO.requestObject, Request, userId)); }
public HttpResponseMessage edit(EditAssignmentCO cO) { int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name); Response response = TheDataStore.editAssignment(cO.id, cO.newName, cO.newDueDateTicks, cO.newDescription, cO.newArchiveStatus); return(TheDataStore.makeHttpResponseMessage(response, cO.requestObject, Request, userId)); }
public HttpResponseMessage archive(ArchiveClassRoomCO cO) { int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name); Response response = TheDataStore.changeClassRoomArchiveStatus(cO.classRoomName, cO.newArchiveStatus); return(TheDataStore.makeHttpResponseMessage(response, cO.requestObject, Request, userId)); }