missing changes

This commit is contained in:
Ulf Gebhardt 2023-02-07 17:25:27 +01:00
parent 3563aef346
commit 868566f716
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
4 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,7 @@ export const unsubscribe = async (email: string): Promise<boolean> => {
if (isLogin) {
return await klicktippConnector.unsubscribe(email)
}
throw new LogError('Could not unsubscribe', email)
throw new Error(`Could not unsubscribe ${email}`)
}
export const getKlickTippUser = async (email: string): Promise<any> => {

View File

@ -1,6 +1,7 @@
import jwt from 'jsonwebtoken'
import CONFIG from '@/config/'
import { CustomJwtPayload } from './CustomJwtPayload'
import LogError from '@/server/LogError'
export const decode = (token: string): CustomJwtPayload | null => {
if (!token) throw new LogError('401 Unauthorized')

View File

@ -1,6 +1,7 @@
import Decimal from 'decimal.js-light'
import CONFIG from '@/config'
import { Decay } from '@model/Decay'
import LogError from '@/server/LogError'
// TODO: externalize all those definitions and functions into an external decay library

View File

@ -1,6 +1,7 @@
import connection from '@/typeorm/connection'
import { getKlickTippUser } from '@/apis/KlicktippController'
import { User } from '@entity/User'
import LogError from '@/server/LogError'
export async function retrieveNotRegisteredEmails(): Promise<string[]> {
const con = await connection()