/// <summary> /// http post method for marking comments as read /// </summary> /// <param name="issueId">issue id</param> /// <param name="type">string and possible options are: Issue, Alternative, Criterion</param> /// <returns>Http response message</returns> public HttpResponseMessage MarkCommentsAsRead(int issueId, string type) { HttpResponseMessage msg = new HttpResponseMessage(); int userId = GetUserIdFromClaim(); if (type == "Issue") { IssueCreating ic = new IssueCreating(); ic.MarkCommentsAsRead(issueId, userId); } else if (type == "Alternative") { IssueBrAlternative iba = new IssueBrAlternative(); iba.MarkCommentsAsRead(issueId, userId); } else if (type == "Criterion") { IssueBrCriteria ibc = new IssueBrCriteria(); ibc.MarkCommentsAsRead(issueId, userId); } return(msg); }
public HttpResponseMessage MarkCommentAsRead(int issueId, string type) { HttpResponseMessage msg = new HttpResponseMessage(); if (type == "Criterion") { IssueBrCriteria ibc = new IssueBrCriteria(); ibc.MarkCommentsAsRead(issueId, GetUserIdFromClaim()); } else if (type == "Alternative") { IssueBrAlternative iba = new IssueBrAlternative(); iba.MarkCommentsAsRead(issueId, GetUserIdFromClaim()); } else if (type == "Issue") { IssueCreating ic = new IssueCreating(); ic.MarkCommentsAsRead(issueId, GetUserIdFromClaim()); } msg.StatusCode = System.Net.HttpStatusCode.OK; return(msg); }