private async Task <GetFCMomentResponse> PrepareMomentForResponse(FCMoment momentInfo)
        {
            momentInfo.InUse = true;
            await fcMomentsRepository.UpdateAsync(momentInfo);

            var amLogs = await fcMomentAMLogRepository.GetRangeByMomentIdAsync(momentInfo.Id);

            SubscribeToReopenAudio(momentInfo.Id);
            return(new GetFCMomentResponse
            {
                NextAmsPredictionModel = mapper.Map <FCMomentModel>(momentInfo),
                AudioMessageLogs = mapper.Map <FCMomentAMLogModel[]>(amLogs)
            });
        }
Beispiel #2
0
 public Task UpdateAsync(FCMoment item)
 {
     fcMomentDataSet.Update(item);
     return(dbContext.SaveChangesAsync());
 }