aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rates.js2
-rw-r--r--lib/register.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/rates.js b/lib/rates.js
index 5a8ba536..8679a08e 100644
--- a/lib/rates.js
+++ b/lib/rates.js
@@ -53,7 +53,7 @@ let fetchRates;
})();
app.get("/rates", async (req, res, next) => {
- res.send(rates);
+ res.send(store.rates);
});
setInterval(() => {
diff --git a/lib/register.js b/lib/register.js
index 7f8a059d..60f8825f 100644
--- a/lib/register.js
+++ b/lib/register.js
@@ -1,8 +1,11 @@
+import config from "$config";
import { authenticator } from "otplib";
+import db from "$db";
import axios from "axios";
import bcrypt from "bcrypt";
+import { l } from "$lib/logging";
-export const register = async (user, ip, requireChallenge) => {
+export default async (user, ip, requireChallenge) => {
if (!(user && user.username)) throw new Error("Username required");
user.username = user.username.replace(/ /g, "");