Remove old mail login API

This commit is contained in:
Jonas Lochmann 2019-09-16 00:00:00 +00:00
parent 249cf52971
commit df2cdab180
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -29,24 +29,6 @@ import {
export const createAuthRouter = (database: Database) => { export const createAuthRouter = (database: Database) => {
const router = Router() const router = Router()
router.post('/send-mail-login-code', json(), async (req, res, next) => {
try {
if (!isSendMailLoginCodeRequest(req.body)) {
throw new BadRequest()
}
const { mailLoginToken } = await sendLoginCode({
mail: req.body.mail,
locale: req.body.locale,
database
})
res.json({ mailLoginToken })
} catch (ex) {
next(ex)
}
})
router.post('/send-mail-login-code-v2', json(), async (req, res, next) => { router.post('/send-mail-login-code-v2', json(), async (req, res, next) => {
try { try {
if (!isSendMailLoginCodeRequest(req.body)) { if (!isSendMailLoginCodeRequest(req.body)) {