public async Task EditTag([Summary("tag")][Remainder] string tag) { using (IServiceScope scope = serviceScopeFactory.CreateScope()) { ITagService tagService = scope.ServiceProvider.GetRequiredService <ITagService>(); TimeStampDto oldTag = tagService.EditTag(Context.User.Id, tag); logger.LogInformation($"{Context.User.Id}|{Context.User.Username} edited \"{oldTag.TagContent}\" to \"{tag}\""); } }
public TimeStamp(TimeStampDto dto) { Id = Guid.NewGuid(); TagContent = dto.TagContent; VideoId = dto.VideoId; UserId = dto.UserId; ActualTime = dto.ActualTime; LastModified = dto.LastModified; Time = dto.Time; UserName = dto.UserName; }
public async Task Tag([Summary("time to subtract in seconds")] int seconds, [Summary("tag")][Remainder] string tag) { using (IServiceScope scope = serviceScopeFactory.CreateScope()) { ITagService tagService = scope.ServiceProvider.GetRequiredService <ITagService>(); if (IsEdit) { TimeStampDto oldTag = tagService.EditTag(Context.User.Id, Context.Message.Id, tag); logger.LogInformation($"{Context.User.Id}|{Context.User.Username} edited \"{oldTag.TagContent}\" to \"{tag}\""); } else { tagService.AddTag(tag, Context.User.Id, Context.User.Username, Context.Message.Id, seconds); logger.LogInformation($"{Context.User.Id}|{Context.User.Username} tagged {tag} with backtrack of {seconds} seconds"); } } }