@@ -342,6 +342,16 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> SubmitCustomTag(ReadingCustomTagDto inDto)
|
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);
|
var entity = await _readingTaskQuestionMarkRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user