From d3fb86dbdb3caed0e01ad90c5b7450f2813d2725 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 1 Sep 2021 22:13:04 +0400 Subject: [PATCH] Since it returns only one song it's obvious to return just that song's attributes. --- radio/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/index.js b/radio/index.js index 220ad4a..aa61b61 100644 --- a/radio/index.js +++ b/radio/index.js @@ -70,7 +70,7 @@ function setRoutes() { ctx.body = await getRadioStatus(); }) .get('/lastsong', async ctx => { - ctx.body = await getLastPlayedSongs(2); + ctx.body = await getLastPlayedSongs(2)[0]; }); }