message: Add comments for config api
diff: @@ -26,6 +26,27 @@ function publicConfig(id: string) {
  @JsonController('/config')
  export class ConfigController {
  + /**
  + * @api {get} /api/config/public/:id Request public config
  + * @apiName GetConfigPublic
  + * @apiGroup Config
  + *
  + * @apiParam {String} id Config name (e.g. imprint).
  + *
  + * @apiSuccess {Config} config Public config.
  + *
  + * @apiSuccessExample {json} Success-Response:
  + * {
  + * "name":"imprint",
  + * "updatedAt": "2018-03-20T21:04:41.696Z",
  + * "value":"This will show the imprint.",
  + * "__v": 0,
  + * "createdAt": "2018-03-20T21:04:41.696Z"
  + * }
  + *
  + * @apiError InternalServerError
  + * @apiError UnauthorizedError
  + */
  @Get('/public/:id')
  async getPublicConfig(@Param('id') name: string) {
  if (publicConfig(name)) {
  @@ -43,6 +64,44 @@ export class ConfigController {
  }
  }
  + /**
  + * @api {put} /api/config/:id Update config
  + * @apiName PutConfig
  + * @apiGroup Config
  + * @apiPermission admin
  + *
  + * @apiParam {String} id Config name (e.g. imprint).
  + * @apiParam {Object} data New data.
  + *
  + * @apiSuccess {Config} config Updated config.
  + *
  + * @apiSuccessExample {json} Success-Response:
  + * {
  + * "$__": {
  + * "strictMode": true,
  + * "selected": {},
  + * "getters": {},
  + * "_id": {...},
  + * "wasPopulated": false,
  + * "activePaths": {...},
  + * "pathsToScopes": {},
  + * "emitter": {...},
  + * "$options": true
  + * },
  + * "isNew": false,
  + * "_doc": {
  + * "createdAt": "2018-03-20T21:04:41.696Z",
  + * "__v": 0,
  + * "value": "This will show the imprint.",
  + * "updatedAt": "2018-03-20T21:04:41.696Z",
  + * "name": "imprint",
  + * "_id": {...}
  + * },
  + * "$init": true
  + * }
  + *
  + * @apiError InternalServerError something went wrong
  + */
  @UseBefore(passportJwtMiddleware)
  @Authorized(['admin'])
  @Put('/:id')
  @@ -59,6 +118,27 @@ export class ConfigController {
  }
  }
  + /**
  + * @api {get} /api/config/:id Request config
  + * @apiName GetConfig
  + * @apiGroup Config
  + * @apiPermission admin
  + *
  + * @apiParam {String} id Config name (e.g. imprint).
  + *
  + * @apiSuccess {Config} config Config.
  + *
  + * @apiSuccessExample {json} Success-Response:
  + * {
  + * "name":"imprint",
  + * "updatedAt": "2018-03-20T21:04:41.696Z",
  + * "value":"This will show the imprint.",
  + * "__v": 0,
  + * "createdAt": "2018-03-20T21:04:41.696Z"
  + * }
  + *
  + * @apiError InternalServerError
  + */
  @UseBefore(passportJwtMiddleware)
  @Authorized(['admin'])
  @Get('/:id')
  