remove unused api

pull/21891/head
ytqh 1 year ago
parent 68777e7de1
commit cb00f43e98

@ -144,202 +144,4 @@ class StudentList(Resource):
)
class StudentStatus(Resource):
@validate_admin_token_and_extract_info
def put(self, app_model: App, account: Account):
"""Update student follow-up status.
---
tags:
- admin/api/students
summary: Update student status
description: Update the follow-up status of a student
security:
- ApiKeyAuth: []
parameters:
- name: student_id
in: path
type: string
required: true
description: ID of the student
- name: body
in: body
required: true
schema:
type: object
required:
- status
properties:
status:
type: string
enum: [to_follow, following, resolved]
description: |
Follow-up status:
* to_follow - Needs follow-up
* following - Currently following up
* resolved - Case resolved
responses:
200:
description: Status updated successfully
schema:
type: object
properties:
success:
type: boolean
example: true
updated_at:
type: string
format: date-time
401:
description: Invalid or missing API key
404:
description: Student not found
400:
description: Invalid status value
"""
pass
@validate_admin_token_and_extract_info
def get(self, app_model: App, account: Account):
"""Get student follow-up status history.
---
tags:
- admin/api/students
summary: Get status history
description: Get the history of status changes for a student
security:
- ApiKeyAuth: []
parameters:
- name: student_id
in: path
type: string
required: true
description: ID of the student
responses:
200:
description: Status history retrieved successfully
schema:
type: object
properties:
current_status:
type: string
enum: [to_follow, following, resolved]
history:
type: array
items:
type: object
properties:
status:
type: string
enum: [to_follow, following, resolved]
changed_at:
type: string
format: date-time
changed_by:
type: string
description: Email of admin who made the change
401:
description: Invalid or missing API key
404:
description: Student not found
"""
pass
class StudentNote(Resource):
@validate_admin_token_and_extract_info
def put(self, app_model: App, account: Account):
"""Update student follow-up note.
---
tags:
- admin/api/students
summary: Update student note
description: Update the follow-up note for a student (max 1000 characters)
security:
- ApiKeyAuth: []
parameters:
- name: student_id
in: path
type: string
required: true
description: ID of the student
- name: body
in: body
required: true
schema:
type: object
required:
- note
properties:
note:
type: string
maxLength: 1000
description: Follow-up note content
responses:
200:
description: Note updated successfully
schema:
type: object
properties:
success:
type: boolean
example: true
updated_at:
type: string
format: date-time
401:
description: Invalid or missing API key
404:
description: Student not found
400:
description: Note too long
"""
pass
@validate_admin_token_and_extract_info
def get(self, app_model: App, account: Account):
"""Get student follow-up note history.
---
tags:
- admin/api/students
summary: Get note history
description: Get the history of note changes for a student
security:
- ApiKeyAuth: []
parameters:
- name: student_id
in: path
type: string
required: true
description: ID of the student
responses:
200:
description: Note history retrieved successfully
schema:
type: object
properties:
current_note:
type: string
history:
type: array
items:
type: object
properties:
note:
type: string
changed_at:
type: string
format: date-time
changed_by:
type: string
description: Email of admin who made the change
401:
description: Invalid or missing API key
404:
description: Student not found
"""
pass
api.add_resource(StudentList, '/students')
# api.add_resource(StudentStatus, '/students/<string:student_id>/status')
# api.add_resource(StudentNote, '/students/<string:student_id>/note')

Loading…
Cancel
Save