Quick fix to get first element of an array after a promise is resolved.

This commit is contained in:
Alexander Andreev 2021-09-01 22:17:09 +04:00
parent 784dc503a5
commit 31e9e14063
Signed by: Arav
GPG Key ID: 610DF2574456329F

View File

@ -70,7 +70,7 @@ function setRoutes() {
ctx.body = await getRadioStatus();
})
.get('/lastsong', async ctx => {
ctx.body = await getLastPlayedSongs(2)[0];
ctx.body = (await getLastPlayedSongs(2))[0];
});
}