From 9121a73d4a5ee340f6c9d3b68186493b7d1bf29a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 6 Sep 2022 10:30:03 -0700 Subject: missing imports --- lib/rates.js | 2 +- lib/register.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') 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, ""); -- cgit v1.2.3