Quick fix to get first element of an array after a promise is resolved.
This commit is contained in:
parent
784dc503a5
commit
31e9e14063
@ -70,7 +70,7 @@ function setRoutes() {
|
|||||||
ctx.body = await getRadioStatus();
|
ctx.body = await getRadioStatus();
|
||||||
})
|
})
|
||||||
.get('/lastsong', async ctx => {
|
.get('/lastsong', async ctx => {
|
||||||
ctx.body = await getLastPlayedSongs(2)[0];
|
ctx.body = (await getLastPlayedSongs(2))[0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user