From 7b58dac768e3e30dfaef0aea0db40d3f2451fb4b Mon Sep 17 00:00:00 2001 From: Florian Hartwich Date: Tue, 20 Mar 2018 13:15:23 +0100 Subject: [PATCH] Fix apib signup test --- api/apib/auth/signup.apib | 2 +- api/apib/base/access.apib | 3 +-- api/routes/authenticate.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/apib/auth/signup.apib b/api/apib/auth/signup.apib index 3dc1036..5f3027b 100644 --- a/api/apib/auth/signup.apib +++ b/api/apib/auth/signup.apib @@ -2,7 +2,7 @@ Create a new application user account. -+ Request Create Account ++ Request Create Account (application/json) + Attributes (Registration) diff --git a/api/apib/base/access.apib b/api/apib/base/access.apib index 56ddd36..4477538 100644 --- a/api/apib/base/access.apib +++ b/api/apib/base/access.apib @@ -21,8 +21,7 @@ https://cc.myserver.lan/api/ ## Authentication -Requests to the API have to be authenticated using an API token which is received after successfully providing your application credentials to the API. - +Requests to most of the API endpoints have to be authenticated using an API token which is received after successfully providing your application credentials to the API. Once acquired the token has to be provided in the ``X-Access-Token`` header of every request that requires authentication. diff --git a/api/routes/authenticate.js b/api/routes/authenticate.js index 22040a4..a7754b6 100644 --- a/api/routes/authenticate.js +++ b/api/routes/authenticate.js @@ -78,7 +78,7 @@ authenticate.route('/signup') .post((req, res, next) => { create(req.body) .then(() => { - res.sendStatus(200); + res.sendStatus(201); }) .catch((err) => { res.status(400).send(err);