Added in InstallId so that Kavita owned Email service can validate if requests are valid or not. (#1036)

This commit is contained in:
Joseph Milazzo 2022-02-05 16:17:51 -08:00 committed by GitHub
parent 5c7cfb8177
commit 98bb6f0b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 2 deletions

View file

@ -11,6 +11,7 @@ using API.DTOs;
using API.DTOs.Account;
using API.DTOs.Email;
using API.Entities;
using API.Entities.Enums;
using API.Errors;
using API.Extensions;
using API.Services;
@ -509,7 +510,8 @@ namespace API.Controllers
await _emailService.SendPasswordResetEmail(new PasswordResetEmailDto()
{
EmailAddress = user.Email,
ServerConfirmationLink = emailLink
ServerConfirmationLink = emailLink,
InstallId = (await _unitOfWork.SettingsRepository.GetSettingAsync(ServerSettingKey.InstallId)).Value
});
return Ok("Email sent");
}
@ -560,7 +562,8 @@ namespace API.Controllers
{
EmailAddress = user.Email,
Username = user.UserName,
ServerConfirmationLink = emailLink
ServerConfirmationLink = emailLink,
InstallId = (await _unitOfWork.SettingsRepository.GetSettingAsync(ServerSettingKey.InstallId)).Value
});