Forgot Password (#1017)
* Implemented forgot password flow. Fixed a bug in manage user where admins were showing the Sharing With section. * Cleaned up the reset password flow. * Reverted some debug code * Fixed an issue with invites due to ImmutableArray not being set.
This commit is contained in:
parent
8564378b77
commit
8ff123e06c
27 changed files with 271 additions and 38 deletions
|
@ -15,6 +15,7 @@ public interface IEmailService
|
|||
Task SendConfirmationEmail(ConfirmationEmailDto data);
|
||||
Task<bool> CheckIfAccessible(string host);
|
||||
Task SendMigrationEmail(EmailMigrationDto data);
|
||||
Task SendPasswordResetEmail(PasswordResetEmailDto data);
|
||||
}
|
||||
|
||||
public class EmailService : IEmailService
|
||||
|
@ -50,6 +51,11 @@ public class EmailService : IEmailService
|
|||
await SendEmailWithPost(ApiUrl + "/api/email/email-migration", data);
|
||||
}
|
||||
|
||||
public async Task SendPasswordResetEmail(PasswordResetEmailDto data)
|
||||
{
|
||||
await SendEmailWithPost(ApiUrl + "/api/email/email-password-reset", data);
|
||||
}
|
||||
|
||||
private static async Task<bool> SendEmailWithGet(string url)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -325,12 +325,8 @@ public class ReaderService : IReaderService
|
|||
if (volume == null) return nonSpecialChapters.First();
|
||||
|
||||
var chapters = volume.Chapters.OrderBy(c => float.Parse(c.Number)).ToList();
|
||||
foreach (var chapter in chapters.Where(chapter => chapter.PagesRead < chapter.Pages))
|
||||
{
|
||||
return chapter;
|
||||
}
|
||||
|
||||
return chapters.First();
|
||||
return chapters.FirstOrDefault(chapter => chapter.PagesRead < chapter.Pages) ?? chapters.First();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ namespace API.Services.Tasks
|
|||
b.FileName)));
|
||||
|
||||
|
||||
var filesToDelete = allBookmarkFiles.ToList().Except(bookmarks).ToList();
|
||||
var filesToDelete = allBookmarkFiles.AsEnumerable().Except(bookmarks).ToList();
|
||||
_logger.LogDebug("[Bookmarks] Bookmark cleanup wants to delete {Count} files", filesToDelete.Count);
|
||||
|
||||
if (filesToDelete.Count == 0) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue