annotations

This commit is contained in:
2024-11-27 12:46:03 +02:00
parent 54b8941f3c
commit ad4eef17f5
12 changed files with 514 additions and 36 deletions
@@ -1,12 +1,59 @@
import express from 'express';
/**
* GamesController. API for the games manager
*/
class GamesController{
name = 'gamesApi'
route = '/api/game'
/**
* Initializes the GamesController plugin
* @param {App} app The application instance
*/
init(app){
const router = express.Router();
const { games } = app;
/**
* API: PUT /api/game/ Create or update game
* @function createOrUpdate
* @memberof GamesController
*/
router.put('/', async (req, res)=>{
});
/**
* API: POST /api/game/ List games by given criteria
* @function list
* @returns {Game[]}
* @memberof GamesController
*/
router.post('/', async (req, res)=>{
})
/**
* API: GET /api/game/:id Retrieve game by ID
* @function read
* @param {string} id The id of the game
* @returns {Game}
* @memberof GamesController
*/
router.get('/:id', async (req, res)=>{
})
/**
* API: DELETE /api/game/:id Delete game by ID
* @function remove
* @param {string} id The id of the game
* @memberof GamesController
*/
router.delete('/:id', async (req, res)=>{
})
app.webServer.xapp.use(this.route, router);
}
}