1
0
mirror of https://git.waldn.net/git/knotteye/satyr.git synced 2025-06-20 02:53:49 +00:00

Add live field to /api/users/all

This commit is contained in:
Karen Konou 2020-08-24 18:14:26 +02:00
parent 108d7ad0b7
commit 15824d25c0
2 changed files with 4 additions and 2 deletions

@ -77,7 +77,9 @@ The array will be wrapped in a JSON object under the key 'users'.
## /api/users/all ## /api/users/all
Same as above, but returns all users regardless of whether they are streaming. Also unfinished. Same as above, but returns all users regardless of whether they are streaming and if they're streaming or not. Also unfinished.
**Example**: `{users: [{username:"foo", title:"bar", live:1}] }`

@ -194,7 +194,7 @@ async function initAPI() {
}); });
}); });
app.post('/api/users/all', (req, res) => { app.post('/api/users/all', (req, res) => {
let qs = 'SELECT username,title FROM user_meta'; let qs = 'SELECT username,title,live FROM user_meta';
if(req.body.sort) { if(req.body.sort) {
switch (req.body.sort) { switch (req.body.sort) {