/
foult080
/
college-schedule-app
Обзор
Документация
Войти
/
foult080
/
college-schedule-app
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/controllers/public-groups.controller.ts
12 строк
440 B
Foult080
feat(): update filters in front app
09 июл 2026, 06:43
09 июл 2026, 06:43
e2f2928
Код
Авторство
О чём код?
import { Request, Response, NextFunction } from 'express'; import { DatabaseHelper } from '../utils/database.js'; import { IGroup } from '../types/types.js'; export const getPublicGroups = async (_req: Request, res: Response, next: NextFunction): Promise<void> => { try { const result = await DatabaseHelper.select<IGroup>('groups', ['id', 'name']); res.status(200).json(result.rows); } catch (error) { next(error); } };