Added more documentation to explain how the system works (especially to api readers)
This commit is contained in:
parent
29c29976f1
commit
da4ab9feeb
3 changed files with 5 additions and 4 deletions
|
|
@ -68,6 +68,7 @@ public class ReadingProfileController(ILogger<ReadingProfileController> logger,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the implicit reading profile for a series, creates one if none exists
|
/// Update the implicit reading profile for a series, creates one if none exists
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>Any modification to the reader settings during reading will create an implicit profile. Use "update-parent" to save to the bound series profile.</remarks>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <param name="seriesId"></param>
|
/// <param name="seriesId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ public class ReadingProfileService(IUnitOfWork unitOfWork, ILocalizationService
|
||||||
UpdateReaderProfileFields(parentProfile, dto, false);
|
UpdateReaderProfileFields(parentProfile, dto, false);
|
||||||
unitOfWork.AppUserReadingProfileRepository.Update(parentProfile);
|
unitOfWork.AppUserReadingProfileRepository.Update(parentProfile);
|
||||||
|
|
||||||
|
// Remove the implicit profile when we UpdateParent (from reader) as it is implied that we are already bound with a non-implicit profile
|
||||||
await DeleteImplicateReadingProfilesForSeries(userId, [seriesId]);
|
await DeleteImplicateReadingProfilesForSeries(userId, [seriesId]);
|
||||||
|
|
||||||
await unitOfWork.CommitAsync();
|
await unitOfWork.CommitAsync();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {Injectable} from '@angular/core';
|
import {inject, Injectable} from '@angular/core';
|
||||||
import {HttpClient} from "@angular/common/http";
|
import {HttpClient} from "@angular/common/http";
|
||||||
import {environment} from "../../environments/environment";
|
import {environment} from "../../environments/environment";
|
||||||
import {ReadingProfile} from "../_models/preferences/reading-profiles";
|
import {ReadingProfile} from "../_models/preferences/reading-profiles";
|
||||||
|
|
@ -8,12 +8,11 @@ import {ReadingProfile} from "../_models/preferences/reading-profiles";
|
||||||
})
|
})
|
||||||
export class ReadingProfileService {
|
export class ReadingProfileService {
|
||||||
|
|
||||||
|
private readonly httpClient = inject(HttpClient);
|
||||||
baseUrl = environment.apiUrl;
|
baseUrl = environment.apiUrl;
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient) { }
|
|
||||||
|
|
||||||
getForSeries(seriesId: number, skipImplicit: boolean = false) {
|
getForSeries(seriesId: number, skipImplicit: boolean = false) {
|
||||||
return this.httpClient.get<ReadingProfile>(this.baseUrl + `ReadingProfile/${seriesId}?skipImplicit=${skipImplicit}`);
|
return this.httpClient.get<ReadingProfile>(this.baseUrl + `reading-profile/${seriesId}?skipImplicit=${skipImplicit}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProfile(profile: ReadingProfile) {
|
updateProfile(profile: ReadingProfile) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue