kopia lustrzana https://github.com/HackerspaceWroclaw/wlokalu
Allowed POST for /api/v1/person/<nick>.
rodzic
0d3525f948
commit
c70228e7b6
3
API.txt
3
API.txt
|
@ -1,7 +1,8 @@
|
|||
PUT http://wlokalu.hswro.org/api/v1/person/<nick>
|
||||
DELETE http://wlokalu.hswro.org/api/v1/person/<nick>
|
||||
|
||||
Person <nick> entered or left premises.
|
||||
Person <nick> entered or left premises. PUT can be also replaced with POST
|
||||
(just for convenience, as normally POST should carry some content).
|
||||
|
||||
|
||||
POST http://wlokalu.hswro.org/api/v1/sensor/<id>
|
||||
|
|
|
@ -16,7 +16,7 @@ def person(request, nick):
|
|||
'uri': request.META['REQUEST_URI'],
|
||||
}
|
||||
|
||||
if request.method == "PUT":
|
||||
if request.method == "PUT" or request.method == "POST":
|
||||
presence.person_entered(nick, context)
|
||||
reply = {"status": "ok"}
|
||||
elif request.method == "DELETE":
|
||||
|
|
Ładowanie…
Reference in New Issue