SF-74: Domain/Application — UserPreferences DTO, interface, Sender role constant
This commit is contained in:
@@ -14,16 +14,16 @@ public interface IUserPreferencesService
|
||||
/// Always returns a valid object — never throws, never returns null.
|
||||
/// Returns defaults if no entry exists in cache.
|
||||
/// </summary>
|
||||
/// <param name="username">The sender's username (ClaimTypes.Name from JWT).</param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<UserPreferencesDto> GetAsync(string username, CancellationToken ct = default);
|
||||
Task<UserPreferencesDto> GetOrCreateAsync(string id, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Persists the given preferences for the user in the distributed cache.
|
||||
/// Failures are non-fatal and silently ignored.
|
||||
/// </summary>
|
||||
/// <param name="username">The sender's username (ClaimTypes.Name from JWT).</param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="preferences">The preferences to persist.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task SaveAsync(string username, UserPreferencesDto preferences, CancellationToken ct = default);
|
||||
Task SaveAsync(string id, UserPreferencesDto preferences, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user