/
astafievk
/
source_code
Обзор
Документация
Войти
/
astafievk
/
source_code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Api/Controllers/roleController.js
16 строк
386 B
astafievK
source code
21 июн 2024, 21:02
21 июн 2024, 21:02
37a1d03
Код
Авторство
О чём код?
const Role = require('../Models/Role') class roleController{ async getRoles(req, res){ try{ const roles = await Role.findAll() return res.json(roles) } catch (e) { console.log(e) res.status(400).json({message: "Ошибка получения данных."}) } } } module.exports = new roleController()