|
|
@@ -8,8 +8,8 @@ Server for Integrated Project, powered by Express.js and Redis, listens only on
|
|
8
|
8
|
* [Running](#running)
|
|
9
|
9
|
* [API](#api)
|
|
10
|
10
|
* [/hello/:name/](#helloname)
|
|
11
|
|
- * [/register/](#register)
|
|
12
|
|
- * [/auth/](#auth)
|
|
|
11
|
+ * [/register/](#userregister)
|
|
|
12
|
+ * [/auth/](#userauth)
|
|
13
|
13
|
|
|
14
|
14
|
### Installation
|
|
15
|
15
|
Instructions are for OSX El Capitan at time of writing.
|
|
|
@@ -43,7 +43,7 @@ node index.js
|
|
43
|
43
|
### /hello/:name/
|
|
44
|
44
|
Returns "Hello :name!" or simply "Hello World!" if no name is present. :)
|
|
45
|
45
|
|
|
46
|
|
-### /register/
|
|
|
46
|
+### /user/register/
|
|
47
|
47
|
In order to register a new user account, a `POST` request should be sent, with
|
|
48
|
48
|
the following data:
|
|
49
|
49
|
```javascript
|
|
|
@@ -62,7 +62,7 @@ The server will then respond with a JSON object that looks something like this:
|
|
62
|
62
|
```
|
|
63
|
63
|
The value of the error code will be `1` if the username already exists.
|
|
64
|
64
|
|
|
65
|
|
-### /auth/
|
|
|
65
|
+### /user/auth/
|
|
66
|
66
|
In order to log into an account, or essentially request a new authentication
|
|
67
|
67
|
token, a `POST` request should be sent with the following data:
|
|
68
|
68
|
```javascript
|