Add staff playtime feature, including backend services, API endpoint, and frontend integration.
WIP
This commit is contained in:
@@ -93,3 +93,5 @@ paths:
|
||||
$ref: './schemas/forms/mail/mail.yml#/GetEmails'
|
||||
/api/site/vote:
|
||||
$ref: './schemas/site/vote.yml#/VoteStats'
|
||||
/api/site/get-staff-playtime/{from}/{to}:
|
||||
$ref: './schemas/site/staff_pt.yml#/GetStaffPlaytime'
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
GetStaffPlaytime:
|
||||
get:
|
||||
tags:
|
||||
- site
|
||||
summary: Get staff playtime for a specified duration
|
||||
description: Get staff playtime for all staff members for a specified duration
|
||||
operationId: getStaffPlaytime
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/From'
|
||||
- $ref: '#/components/parameters/To'
|
||||
responses:
|
||||
'200':
|
||||
description: Staff playtime retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/StaffPlaytimeList'
|
||||
components:
|
||||
parameters:
|
||||
From:
|
||||
name: from
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2025-01-01T00:00:00.000Z
|
||||
To:
|
||||
name: to
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2025-01-07T23:59:59.999Z
|
||||
schemas:
|
||||
StaffPlaytimeList:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/StaffPlaytime'
|
||||
StaffPlaytime:
|
||||
type: object
|
||||
properties:
|
||||
staff_member:
|
||||
type: string
|
||||
description: The name of the staff member
|
||||
playtime:
|
||||
type: integer
|
||||
description: Total playtime for the specified duration in minutes
|
||||
last_played:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Last played timestamp
|
||||
Reference in New Issue
Block a user