mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
implement session stats, fixes last (admin|user) left at won't work for any provider that removed users after logout.
This commit is contained in:
@@ -125,6 +125,21 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/MemberProfile'
|
||||
required: true
|
||||
/api/stats:
|
||||
get:
|
||||
summary: stats
|
||||
operationId: stats
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Stats'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
|
||||
#
|
||||
# sessions
|
||||
@@ -1145,6 +1160,30 @@ components:
|
||||
is_watching:
|
||||
type: boolean
|
||||
|
||||
Stats:
|
||||
type: object
|
||||
properties:
|
||||
has_host:
|
||||
type: boolean
|
||||
host_id:
|
||||
type: string
|
||||
optional: true
|
||||
server_started_at:
|
||||
type: string
|
||||
format: date-time
|
||||
total_users:
|
||||
type: integer
|
||||
last_user_left_at:
|
||||
type: string
|
||||
format: date-time
|
||||
optional: true
|
||||
total_admins:
|
||||
type: integer
|
||||
last_admin_left_at:
|
||||
type: string
|
||||
format: date-time
|
||||
optional: true
|
||||
|
||||
#
|
||||
# room
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user