From 1fbe9558bfc0c16a939f3c0c13b01dee4480b24b Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 17 May 2016 14:50:24 -0600 Subject: [PATCH] Set up a session when the user gets created That way we don't have to login after creating a user. yay. --- vanth/api/user.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vanth/api/user.py b/vanth/api/user.py index 095840a..d881e72 100644 --- a/vanth/api/user.py +++ b/vanth/api/user.py @@ -16,6 +16,11 @@ class User(sepiida.endpoints.APIEndpoint): @staticmethod def post(payload): uri = vanth.platform.user.create(payload['name'], payload['username'], payload['password']) + vanth.auth.set_session({ + 'name' : payload['name'], + 'uri' : uri, + 'username' : payload['username'], + }) return None, 204, {'Location': uri}