2 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/auth/login.ts b/src/routes/auth/login.ts
index 1938b794..275f78c6 100644
--- a/src/routes/auth/login.ts
+++ b/src/routes/auth/login.ts
@@ -27,7 +27,7 @@ router.post(
// TODO: Rewrite this to have the proper config syntax on the new method
- const config = Config.apiConfig.getAll();
+ const config = Config.apiConfig.getAll() as Config.DefaultOptions;
if (config.login.requireCaptcha && config.security.captcha.enabled) {
if (!captcha_key) {
@@ -71,7 +71,7 @@ export async function generateToken(id: string) {
return new Promise((res, rej) => {
jwt.sign(
{ id: id, iat },
- Config.apiConfig.getAll().security.jwtSecret,
+ (Config.apiConfig.getAll() as Config.DefaultOptions).security.jwtSecret,
{
algorithm,
},
diff --git a/src/routes/auth/register.ts b/src/routes/auth/register.ts
index ca6351fa..b52b5cf3 100644
--- a/src/routes/auth/register.ts
+++ b/src/routes/auth/register.ts
@@ -52,7 +52,7 @@ router.post(
let discriminator = "";
// get register Config
- const { register, security } = Config.apiConfig.getAll();
+ const { register, security } = Config.apiConfig.getAll() as Config.DefaultOptions;
// check if registration is allowed
if (!register.allowNewRegistration) {
|