Refactor code structure and remove redundant sections for improved readability and maintainability
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 47s

This commit is contained in:
Torsten Schulz (local)
2026-05-18 13:01:35 +02:00
parent 197f06989f
commit b9bbd45ae9
27 changed files with 18 additions and 12 deletions

View File

@@ -27,8 +27,8 @@ const activate = async (req, res, next) => {
const loginUser = async (req, res, next) => {
try {
const { email, password } = req.body;
const result = await login(email, password);
const { email, password, rememberMe } = req.body;
const result = await login(email, password, { rememberMe });
res.status(200).json(result);
} catch (error) {
next(error);
@@ -37,7 +37,7 @@ const loginUser = async (req, res, next) => {
const logoutUser = async (req, res, next) => {
try {
const token = req.headers['authorization']?.split(' ')[1];
const token = req.headers['authorization']?.split(' ')[1] || req.headers.authcode;
const result = await logout(token);
res.status(200).json(result);
} catch (error) {