mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 01:27:01 +02:00
refactor: track created chat rooms, v3 admin calls to retrieve and delete chat rooms, chat room deletion methods
This commit is contained in:
46
public/openapi/write/admin/chats.yaml
Normal file
46
public/openapi/write/admin/chats.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: get chat rooms
|
||||
description: This operation returns all chat rooms managed by NodeBB. **For privacy reasons**, only chat room metadata is shown.
|
||||
parameters:
|
||||
- in: query
|
||||
name: perPage
|
||||
schema:
|
||||
type: number
|
||||
description: The number of chat rooms displayed per page
|
||||
example: 20
|
||||
- in: query
|
||||
name: page
|
||||
schema:
|
||||
type: number
|
||||
description: The page number
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Chat rooms retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
rooms:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
owner:
|
||||
type: number
|
||||
roomId:
|
||||
type: number
|
||||
userCount:
|
||||
type: number
|
||||
roomName:
|
||||
type: string
|
||||
groupChat:
|
||||
type: boolean
|
||||
26
public/openapi/write/admin/chats/roomId.yaml
Normal file
26
public/openapi/write/admin/chats/roomId.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: delete chat room
|
||||
description: This operation deletes a chat room from the database
|
||||
parameters:
|
||||
- in: path
|
||||
name: roomId
|
||||
schema:
|
||||
type: number
|
||||
description: The roomId to be deleted
|
||||
example: 1
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Chat room deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties: {}
|
||||
Reference in New Issue
Block a user