docs
This commit is contained in:
@@ -4,7 +4,7 @@ import multipart from 'connect-multiparty';
|
||||
const multipartMiddleware = multipart();
|
||||
|
||||
/**
|
||||
* GameObjectsController. API for the game objects manager
|
||||
* GameObjectsController. API for the game objects manager, граничен клас за комуникация с модула за игрови обекти
|
||||
*/
|
||||
class GameObjectsController{
|
||||
|
||||
@@ -12,15 +12,15 @@ class GameObjectsController{
|
||||
route = '/api/game-object'
|
||||
|
||||
/**
|
||||
* Initializes the GameObjectsController plugin
|
||||
* @param {App} app The application instance
|
||||
* Initializes the GameObjectsController plugin, инициализация
|
||||
* @param {App} app The application instance, апликация
|
||||
*/
|
||||
init(app){
|
||||
const { gameObject } = app;
|
||||
const router = express.Router();
|
||||
|
||||
/**
|
||||
* API: PUT /api/game-object/ Create or update game object
|
||||
* API: PUT /api/game-object/ Create or update game object, създаване или обновяване на игрови обект
|
||||
* @function createOrUpdate
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class GameObjectsController{
|
||||
});
|
||||
|
||||
/**
|
||||
* API: POST /api/game-object/ List game objects by given criteria
|
||||
* API: POST /api/game-object/ List game objects by given criteria, търсене на обекти по критерии
|
||||
* @function list
|
||||
* @returns {GameObject[]}
|
||||
* @memberof GameObjectsController
|
||||
@@ -47,9 +47,9 @@ class GameObjectsController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: GET /api/game-object/:id Retrieve game object by ID
|
||||
* API: GET /api/game-object/:id Retrieve game object by ID, извличане на обект по идентификатор
|
||||
* @function read
|
||||
* @param {string} id The id of the game object
|
||||
* @param {string} id The id of the game object, идентификатор на обекта
|
||||
* @returns {GameObject}
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
@@ -59,9 +59,9 @@ class GameObjectsController{
|
||||
})
|
||||
|
||||
/**
|
||||
* API: DELETE /api/game-object/:id Delete game object by ID
|
||||
* API: DELETE /api/game-object/:id Delete game object by ID, изтриване на обект по даден идентификатор
|
||||
* @function remove
|
||||
* @param {string} id The id of the game object
|
||||
* @param {string} id The id of the game object, идентификатор на обекта
|
||||
* @memberof GameObjectsController
|
||||
*/
|
||||
router.delete('/:id', async (req, res)=>{
|
||||
|
||||
Reference in New Issue
Block a user