Don't include user UUID in public API endpoint

This commit is contained in:
Evert Prants 2019-10-23 17:00:06 +03:00
parent 68984cd858
commit fa2d87ef18
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

1
app.js
View File

@ -451,6 +451,7 @@ app.get('/api/channel/:name', async (req, res) => {
if (!data) return res.jsonp({ error: 'No such channel!' }) if (!data) return res.jsonp({ error: 'No such channel!' })
let links = await db.all('SELECT * FROM link WHERE uuid = ?', data.user_uuid) let links = await db.all('SELECT * FROM link WHERE uuid = ?', data.user_uuid)
delete data.user_uuid
data.live = data.live_at != null data.live = data.live_at != null
data.live_at = new Date(parseInt(data.live_at)) data.live_at = new Date(parseInt(data.live_at))
data.last_stream = new Date(parseInt(data.last_stream)) data.last_stream = new Date(parseInt(data.last_stream))