mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-31 03:45:20 -04:00
Fixed a deployment bug where we weren't listening on port properly. New way will force firewall exception dialog on Windows and work across board. Implemented user preferences and ability to update them.
This commit is contained in:
@@ -25,6 +25,11 @@ namespace API.Data
|
||||
{
|
||||
_context.Entry(user).State = EntityState.Modified;
|
||||
}
|
||||
|
||||
public void Update(AppUserPreferences preferences)
|
||||
{
|
||||
_context.Entry(preferences).State = EntityState.Modified;
|
||||
}
|
||||
|
||||
public void Delete(AppUser user)
|
||||
{
|
||||
@@ -59,6 +64,13 @@ namespace API.Data
|
||||
_context.AppUserRating.Add(userRating);
|
||||
}
|
||||
|
||||
public async Task<AppUserPreferences> GetPreferencesAsync(string username)
|
||||
{
|
||||
return await _context.AppUserPreferences
|
||||
.Include(p => p.AppUser)
|
||||
.SingleOrDefaultAsync(p => p.AppUser.UserName == username);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MemberDto>> GetMembersAsync()
|
||||
{
|
||||
return await _context.Users
|
||||
|
||||
Reference in New Issue
Block a user