mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-10-14 01:37:15 +00:00
return better data for ping api, add to readme
This commit is contained in:
parent
3ae9fe5405
commit
cae00b032b
@ -104,3 +104,16 @@ POST /api/download/
|
||||
|
||||
## Download Queue Item View
|
||||
/api/download/\<video_id>/
|
||||
|
||||
|
||||
## Ping View
|
||||
Validate your connection with the API
|
||||
GET /api/ping
|
||||
|
||||
When valid returns message with user id:
|
||||
```json
|
||||
{
|
||||
"response": "pong",
|
||||
"user": 1
|
||||
}
|
||||
```
|
||||
|
@ -271,7 +271,7 @@ class PingView(ApiBaseView):
|
||||
@staticmethod
|
||||
def get(request):
|
||||
"""get pong"""
|
||||
data = {"pong": request.user.id}
|
||||
data = {"response": "pong", "user": request.user.id}
|
||||
return Response(data)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user