-/* A stats page (only available to admin users) */
-app.get('/stats/', auth_admin, (request, response) => {
- let active = 0;
- let idle = 0;
+/* API to set uer profile information */
+app.put('/profile', (request, response) => {
+ const nickname = request.body.nickname;
+ if (nickname) {
+ request.session.nickname = nickname;
+ request.session.save();
+ }
+ response.send();
+});
+
+/* An admin page (only available to admin users, of course) */
+app.get('/admin/', auth_admin, (request, response) => {
+ let active = [];
+ let idle = [];