Get all textbooks

GET /api/textbooks/getalltextbooks

Retrieves a list of all textbooks with basic information. This endpoint requires JWT authentication.

Responses

  • 200 application/json

    Successfully retrieved all textbooks

    Hide response attribute Show response attribute object
    • textbooks array[object]
      Hide textbooks attributes Show textbooks attributes object
      • label string
      • value string
  • 401 text/plain

    Unauthorized - No valid JWT token provided

  • 403 text/plain

    Forbidden - Invalid JWT token

  • 500 text/plain

    Internal server error

GET /api/textbooks/getalltextbooks
curl \
 --request GET 'http://localhost:xxxx/api/textbooks/getalltextbooks' \
 --cookie "jwt=$API_KEY"
Response examples (200)
{
  "textbooks": [
    {
      "label": "计算机科学导论 by 张三",
      "value": "60d21b4667d0d8992e610c85"
    }
  ]
}
Response examples (401)
您未通过身份验证
Response examples (403)
无效的令牌
Response examples (500)
服务器内部错误