Allowed POST for /api/v1/person/<nick>.

pull/1/head
Stanislaw Klekot 2014-06-19 18:06:05 +02:00
rodzic 0d3525f948
commit c70228e7b6
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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":