Ignore:
Timestamp:
11/04/21 22:09:29 (3 years ago)
Author:
Стојков Марко <mst@…>
Branches:
dev
Children:
dd264cb
Parents:
91bfcf4
Message:

Respond to answer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/FinkiChattery/FinkiChattery.Api/ApplicationServices/Questioning/Mapper/QuestionMapper.cs

    r91bfcf4 r68d02ca  
    4848                            var answerResponseStudent = new AnswerResponseStudentQuestionStateResponse(y.StudentDto.Id, y.StudentDto.Uid, y.StudentDto.Index, y.StudentDto.ImageUrl, y.StudentDto.Reputation);
    4949
    50                             return new AnswerResponseQuestionStateResponse(y.Id, y.Uid, y.Text, y.CreatedOn, answerResponseStudent);
     50                            return ToAnswerResponseQuestionStateResponse(y);
    5151                        });
    5252                    }
     
    7676            return new QuestionStateResponse(questionState.Id, questionState.Uid, questionState.Title, questionState.Text, questionState.CreatedOn, questionState.Views, questionState.LastActiveOn, student, answers, questionCategories, team);
    7777        }
     78
     79        public static AnswerResponseQuestionStateResponse ToAnswerResponseQuestionStateResponse(this AnswerResponseQuestionStateDto dto)
     80        {
     81            var answerResponseStudent = new AnswerResponseStudentQuestionStateResponse(dto.StudentDto.Id, dto.StudentDto.Uid, dto.StudentDto.Index, dto.StudentDto.ImageUrl, dto.StudentDto.Reputation);
     82
     83            return new AnswerResponseQuestionStateResponse(dto.Id, dto.Uid, dto.Text, dto.CreatedOn, answerResponseStudent);
     84        }
    7885    }
    7986}
Note: See TracChangeset for help on using the changeset viewer.