@@ -342,6 +342,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SubmitCustomTag(ReadingCustomTagDto inDto)
|
||||
{
|
||||
|
||||
if (inDto.Id == null&&inDto.MarkId!=null)
|
||||
{
|
||||
var oldMark = await _readingTaskQuestionMarkRepository.Where(x => x.MarkId == inDto.MarkId && x.QuestionId == null).FirstOrDefaultAsync();
|
||||
if( oldMark != null)
|
||||
{
|
||||
inDto.Id = oldMark.Id;
|
||||
}
|
||||
}
|
||||
|
||||
var entity = await _readingTaskQuestionMarkRepository.InsertOrUpdateAsync(inDto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user