mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 09:32:59 +01:00
* feat: allow invites in normal registration mode + invite privilege * feat: select groups to join from an invite * test: check if groups from invitations have been joined * fix: remove unused variable * feat: write API versions of socket calls * docs: openapi specs for the new routes * test: iron out mongo redis difference * refactor: move inviteGroups endpoint into write API * refactor: use GET /api/v3/users/:uid/invites/groups Instead of GET /api/v3/users/:uid/inviteGroups * fix: no need for /api/v3 prefix when using api module * fix: tests * refactor: change POST /api/v3/users/invite To POST /api/v3/users/:uid/invites * refactor: make helpers.invite awaitable * fix: restrict invite API to self-use only * fix: move invite groups controller to write api, +tests * fix: tests Co-authored-by: Julian Lam <julian@nodebb.org>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
post:
|
|
tags:
|
|
- users
|
|
summary: invite users with email by email
|
|
description: This operation sends an invitation email to the given addresses, with an option to join selected groups on acceptance
|
|
parameters:
|
|
- in: path
|
|
name: uid
|
|
schema:
|
|
type: integer
|
|
required: true
|
|
description: uid of the user sending invitations
|
|
example: 1
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
emails:
|
|
type: string
|
|
description: A single or list of comma separated email addresses
|
|
example: friend01@example.com,friend02@example.com
|
|
groupsToJoin:
|
|
type: array
|
|
description: A collection of group names
|
|
example: ['administrators']
|
|
required:
|
|
- emails
|
|
responses:
|
|
'200':
|
|
description: invitation email(s) sent
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
|
response:
|
|
type: object
|
|
'400':
|
|
$ref: ../../../components/responses/400.yaml#/400
|
|
'401':
|
|
$ref: ../../../components/responses/401.yaml#/401
|
|
'403':
|
|
$ref: ../../../components/responses/403.yaml#/403 |