Skip to content

Commit

Permalink
Merge pull request #9527 from goofmint/fix/doc-v3-invited
Browse files Browse the repository at this point in the history
support(jsdoc): add swagger document to invited.ts
  • Loading branch information
yuki-takei authored Dec 27, 2024
2 parents 46b693b + 2c766ff commit 675b6f1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions apps/app/src/server/routes/apiv3/invited.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,48 @@ module.exports = (crowi: Crowi): Router => {
const applicationInstalled = require('../../middlewares/application-installed')(crowi);
const router = express.Router();

/**
* @swagger
*
* /invited:
* post:
* tags: [Users]
* security:
* - cookieAuth: []
* operationId: activateInvitedUser
* summary: /invited
* description: Activate invited user
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* invitedForm:
* type: object
* properties:
* username:
* type: string
* description: The username of the invited user.
* name:
* type: string
* description: The name of the invited user.
* password:
* type: string
* description: The password for the invited user.
* responses:
* 200:
* description: User activated successfully
* content:
* application/json:
* schema:
* type: object
* properties:
* redirectTo:
* type: string
* description: URL to redirect after successful activation.
*/
router.post('/', applicationInstalled, invitedRules(), invitedValidation, async(req: InvitedFormRequest, res: ApiV3Response) => {
if (!req.user) {
return res.apiv3({ redirectTo: '/login' });
Expand Down

0 comments on commit 675b6f1

Please sign in to comment.