Angular 19 + Even more bugfixes (#3675)
This commit is contained in:
parent
535165c445
commit
cc3ae7f472
249 changed files with 4400 additions and 4315 deletions
|
|
@ -235,131 +235,121 @@ public class ChapterController : BaseApiController
|
|||
|
||||
|
||||
#region Genres
|
||||
if (dto.Genres is {Count: > 0})
|
||||
{
|
||||
chapter.Genres ??= new List<Genre>();
|
||||
await GenreHelper.UpdateChapterGenres(chapter, dto.Genres.Select(t => t.Title), _unitOfWork);
|
||||
}
|
||||
chapter.Genres ??= [];
|
||||
await GenreHelper.UpdateChapterGenres(chapter, dto.Genres.Select(t => t.Title), _unitOfWork);
|
||||
#endregion
|
||||
|
||||
#region Tags
|
||||
if (dto.Tags is {Count: > 0})
|
||||
{
|
||||
chapter.Tags ??= new List<Tag>();
|
||||
await TagHelper.UpdateChapterTags(chapter, dto.Tags.Select(t => t.Title), _unitOfWork);
|
||||
}
|
||||
chapter.Tags ??= [];
|
||||
await TagHelper.UpdateChapterTags(chapter, dto.Tags.Select(t => t.Title), _unitOfWork);
|
||||
#endregion
|
||||
|
||||
#region People
|
||||
if (PersonHelper.HasAnyPeople(dto))
|
||||
{
|
||||
chapter.People ??= new List<ChapterPeople>();
|
||||
chapter.People ??= [];
|
||||
|
||||
// Update writers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Writers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Writer,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update writers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Writers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Writer,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update characters
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Characters.Select(p => p.Name).ToList(),
|
||||
PersonRole.Character,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update characters
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Characters.Select(p => p.Name).ToList(),
|
||||
PersonRole.Character,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update pencillers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Pencillers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Penciller,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update pencillers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Pencillers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Penciller,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update inkers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Inkers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Inker,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update inkers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Inkers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Inker,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update colorists
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Colorists.Select(p => p.Name).ToList(),
|
||||
PersonRole.Colorist,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update colorists
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Colorists.Select(p => p.Name).ToList(),
|
||||
PersonRole.Colorist,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update letterers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Letterers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Letterer,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update letterers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Letterers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Letterer,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update cover artists
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.CoverArtists.Select(p => p.Name).ToList(),
|
||||
PersonRole.CoverArtist,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update cover artists
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.CoverArtists.Select(p => p.Name).ToList(),
|
||||
PersonRole.CoverArtist,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update editors
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Editors.Select(p => p.Name).ToList(),
|
||||
PersonRole.Editor,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update editors
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Editors.Select(p => p.Name).ToList(),
|
||||
PersonRole.Editor,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update publishers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Publishers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Publisher,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update publishers
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Publishers.Select(p => p.Name).ToList(),
|
||||
PersonRole.Publisher,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update translators
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Translators.Select(p => p.Name).ToList(),
|
||||
PersonRole.Translator,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update translators
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Translators.Select(p => p.Name).ToList(),
|
||||
PersonRole.Translator,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update imprints
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Imprints.Select(p => p.Name).ToList(),
|
||||
PersonRole.Imprint,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update imprints
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Imprints.Select(p => p.Name).ToList(),
|
||||
PersonRole.Imprint,
|
||||
_unitOfWork
|
||||
);
|
||||
// Update teams
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Teams.Select(p => p.Name).ToList(),
|
||||
PersonRole.Team,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update teams
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Teams.Select(p => p.Name).ToList(),
|
||||
PersonRole.Team,
|
||||
_unitOfWork
|
||||
);
|
||||
|
||||
// Update locations
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Locations.Select(p => p.Name).ToList(),
|
||||
PersonRole.Location,
|
||||
_unitOfWork
|
||||
);
|
||||
}
|
||||
// Update locations
|
||||
await PersonHelper.UpdateChapterPeopleAsync(
|
||||
chapter,
|
||||
dto.Locations.Select(p => p.Name).ToList(),
|
||||
PersonRole.Location,
|
||||
_unitOfWork
|
||||
);
|
||||
#endregion
|
||||
|
||||
#region Locks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue