/
GlomyWhisper
/
TestWork
Обзор
Документация
Войти
/
GlomyWhisper
/
TestWork
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
controllers/auth.controller.js
24 строки
448 B
glomywhisper
Initial commit: user service API
17 май 2026, 01:11
17 май 2026, 01:11
9cee241
Код
Авторство
О чём код?
const authService = require('../services/auth.service'); async function register(req, res, next) { try { const user = await authService.register(req.body); res.status(201).json(user); } catch (error) { next(error); } } async function login(req, res, next) { try { const result = await authService.login(req.body); res.json(result); } catch (error) { next(error); } } module.exports = { register, login };