|
|
@@ -24,6 +24,7 @@ Server for Integrated Project, powered by Express.js and Redis, listens only on
|
|
24
|
24
|
* [/society/view/:society\_name/events](#societyviewsociety_nameevents)
|
|
25
|
25
|
* [/society/join/](#societyjoin)
|
|
26
|
26
|
* [/society/leave/](#societyleave)
|
|
|
27
|
+ * [/society/promote/](#societypromote)
|
|
27
|
28
|
* __Events__
|
|
28
|
29
|
* [/events/create/](#eventscreate)
|
|
29
|
30
|
* [/events/view/:eventid](#eventsvieweventid)
|
|
|
@@ -310,6 +311,27 @@ The response is then formed as follows:
|
|
310
|
311
|
The error codes are as follows, `1` indicates that the user isn't a member
|
|
311
|
312
|
of that society and `2` indicates a malformed request.
|
|
312
|
313
|
|
|
|
314
|
+### /society/promote/
|
|
|
315
|
+To promote a user within a society, a `POST` request should be sent with the
|
|
|
316
|
+following data:
|
|
|
317
|
+```javascript
|
|
|
318
|
+{
|
|
|
319
|
+ "user": "Test1",
|
|
|
320
|
+ "society": "TestSociety",
|
|
|
321
|
+ "auth": "$2a$10$qjkvbcPZ4YC7/a/I0ZpTaeJp6auXjGrG9pgAdI3PP61u4CftQPSL2"
|
|
|
322
|
+}
|
|
|
323
|
+```
|
|
|
324
|
+The response will then be formed as follows:
|
|
|
325
|
+```javascript
|
|
|
326
|
+{
|
|
|
327
|
+ "success": 1,
|
|
|
328
|
+ "error": 0
|
|
|
329
|
+}
|
|
|
330
|
+```
|
|
|
331
|
+The error codes are as follows, `1` indicates that the auth key is invalid, `2`
|
|
|
332
|
+indicates that the user does not belong to the society, `3` indicates that the
|
|
|
333
|
+user is already an admin and `4` indicates a malformed request.
|
|
|
334
|
+
|
|
313
|
335
|
### /events/create/
|
|
314
|
336
|
To create a new event, a `POST` request should be sent with the following data:
|
|
315
|
337
|
```javascript
|