Files
DLE/backend/routes/users.js

18 lines
462 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const express = require('express');
const router = express.Router();
// Получение списка пользователей
router.get('/', (req, res) => {
res.json({ message: 'Users API endpoint' });
});
// Получение информации о пользователе
router.get('/:address', (req, res) => {
const { address } = req.params;
res.json({
address,
message: 'User details endpoint'
});
});
module.exports = router;