|
|
@@ -63,87 +63,6 @@ const LIMIT_FOR_MULTIPLE_PAGE_OP = 20;
|
|
|
* example: 3
|
|
|
*/
|
|
|
|
|
|
-/**
|
|
|
- * @swagger
|
|
|
- *
|
|
|
- * components:
|
|
|
- * schemas:
|
|
|
- * Page:
|
|
|
- * description: Page
|
|
|
- * type: object
|
|
|
- * properties:
|
|
|
- * _id:
|
|
|
- * type: string
|
|
|
- * description: page ID
|
|
|
- * example: 5e07345972560e001761fa63
|
|
|
- * __v:
|
|
|
- * type: number
|
|
|
- * description: DB record version
|
|
|
- * example: 0
|
|
|
- * commentCount:
|
|
|
- * type: number
|
|
|
- * description: count of comments
|
|
|
- * example: 3
|
|
|
- * createdAt:
|
|
|
- * type: string
|
|
|
- * description: date created at
|
|
|
- * example: 2010-01-01T00:00:00.000Z
|
|
|
- * creator:
|
|
|
- * $ref: '#/components/schemas/User'
|
|
|
- * extended:
|
|
|
- * type: object
|
|
|
- * description: extend data
|
|
|
- * example: {}
|
|
|
- * grant:
|
|
|
- * type: number
|
|
|
- * description: grant
|
|
|
- * example: 1
|
|
|
- * grantedUsers:
|
|
|
- * type: array
|
|
|
- * description: granted users
|
|
|
- * items:
|
|
|
- * type: string
|
|
|
- * description: user ID
|
|
|
- * example: ["5ae5fccfc5577b0004dbd8ab"]
|
|
|
- * lastUpdateUser:
|
|
|
- * $ref: '#/components/schemas/User'
|
|
|
- * liker:
|
|
|
- * type: array
|
|
|
- * description: granted users
|
|
|
- * items:
|
|
|
- * type: string
|
|
|
- * description: user ID
|
|
|
- * example: []
|
|
|
- * path:
|
|
|
- * type: string
|
|
|
- * description: page path
|
|
|
- * example: /Sandbox/Math
|
|
|
- * revision:
|
|
|
- * type: string
|
|
|
- * description: revision ID
|
|
|
- * example: ["5ae5fccfc5577b0004dbd8ab"]
|
|
|
- * seenUsers:
|
|
|
- * type: array
|
|
|
- * description: granted users
|
|
|
- * items:
|
|
|
- * type: string
|
|
|
- * description: user ID
|
|
|
- * example: ["5ae5fccfc5577b0004dbd8ab"]
|
|
|
- * status:
|
|
|
- * type: string
|
|
|
- * description: status
|
|
|
- * enum:
|
|
|
- * - 'wip'
|
|
|
- * - 'published'
|
|
|
- * - 'deleted'
|
|
|
- * - 'deprecated'
|
|
|
- * example: published
|
|
|
- * updatedAt:
|
|
|
- * type: string
|
|
|
- * description: date updated at
|
|
|
- * example: 2010-01-01T00:00:00.000Z
|
|
|
- */
|
|
|
-
|
|
|
module.exports = (crowi) => {
|
|
|
const accessTokenParser = require('../../../middlewares/access-token-parser')(crowi);
|
|
|
const loginRequired = require('../../../middlewares/login-required')(crowi, true);
|