Download pool/shard007/JavaScript/0044058_events_router.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044058_events_router.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard007/JavaScript/0044058_events_router.js
-
curl -L -o 0044058_events_router.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044058_events_router.js
929 Bytes
| var EventsRouter = Ne.Class("EventsRouter")({ | |
| setupRoutes : function setupRoutes(app) { | |
| app.get('/api/v1/events', function (req, res) { | |
| EventsController.index(req, res); | |
| }); | |
| app.get('/api/v1/events/:id', function (req, res) { | |
| EventsController.show(req, res); | |
| }); | |
| app.post('/api/v1/events/:id/teams', function (req, res) { | |
| EventsController.addTeam(req, res); | |
| }); | |
| app.get('/api/v1/events/:id/teams', function (req, res) { | |
| EventsController.getTeams(req, res); | |
| }); | |
| app.post('/api/v1/events/:id/players', function (req, res) { | |
| EventsController.addPlayer(req, res); | |
| }); | |
| app.get('/api/v1/events/:id/players', function (req, res) { | |
| EventsController.getPlayers(req, res); | |
| }); | |
| app.get('/api/v1/events/:id/players/:playerId/remove', function (req, res) { | |
| EventsController.removePlayer(req, res); | |
| }); | |
| } | |
| }); | |
| module.exports = EventsRouter; | |