mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 22:35:17 -04:00
v0.8.9.1 Hotfix (#4376)
Co-authored-by: Joe Milazzo <josephmajora@gmail.com> Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Adam Havránek <adamhavra@seznam.cz> Co-authored-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com> Co-authored-by: Christophorus Daniel Tegar P <tegar.200503@gmail.com> Co-authored-by: Frozehunter <frozehunter@me.com> Co-authored-by: Gregory.Open <gregory.open@proton.me> Co-authored-by: Havokdan <havokdan@yahoo.com.br> Co-authored-by: Kovács Gábor <naszalykmb@gmail.com> Co-authored-by: karigane <169052233+karigane-cha@users.noreply.github.com> Co-authored-by: lin49931104 <a82122794@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: 無情天 <kofzhanganguo@126.com> Co-authored-by: 안세훈 <on9686@gmail.com>
This commit is contained in:
@@ -81,8 +81,14 @@ public class PluginController(IUnitOfWork unitOfWork, ITokenService tokenService
|
||||
/// <remarks>Will always return null if the Auth Key does not belong to this account</remarks>
|
||||
/// <returns></returns>
|
||||
[HttpGet("authkey-expires")]
|
||||
public async Task<ActionResult<DateTime?>> GetAuthKeyExpiration([Required] string authKey)
|
||||
public async Task<ActionResult<DateTime?>> GetAuthKeyExpiration()
|
||||
{
|
||||
return Ok(await unitOfWork.UserRepository.GetAuthKeyExpiration(authKey, UserId));
|
||||
var authKey = AuthKey;
|
||||
if (string.IsNullOrEmpty(authKey))
|
||||
return BadRequest();
|
||||
|
||||
var exp = await unitOfWork.UserRepository.GetAuthKeyExpiration(authKey, UserId);
|
||||
|
||||
return Ok(new { ExpiresAt = exp?.ToUniversalTime() });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user