mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +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
|
## Download Queue Item View
|
||||||
/api/download/\<video_id>/
|
/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
|
@staticmethod
|
||||||
def get(request):
|
def get(request):
|
||||||
"""get pong"""
|
"""get pong"""
|
||||||
data = {"pong": request.user.id}
|
data = {"response": "pong", "user": request.user.id}
|
||||||
return Response(data)
|
return Response(data)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user