From 7bf47b2d50cd5b7c566f5135dbd17d4a5604a868 Mon Sep 17 00:00:00 2001 From: An Phan Date: Sat, 13 Aug 2016 10:52:09 +0800 Subject: [PATCH] Fix latest songs/albums --- resources/assets/js/stores/album.js | 2 +- resources/assets/js/stores/song.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/stores/album.js b/resources/assets/js/stores/album.js index 14224c80..5039f494 100644 --- a/resources/assets/js/stores/album.js +++ b/resources/assets/js/stores/album.js @@ -178,6 +178,6 @@ export const albumStore = { getRecentlyAdded(n = 6) { const applicable = filter(this.all, album => album.id !== 1); - return take(orderBy(applicable, 'date_created', 'desc'), n); + return take(orderBy(applicable, 'created_at', 'desc'), n); }, }; diff --git a/resources/assets/js/stores/song.js b/resources/assets/js/stores/song.js index ccab70a7..ba5e671e 100644 --- a/resources/assets/js/stores/song.js +++ b/resources/assets/js/stores/song.js @@ -358,7 +358,7 @@ export const songStore = { * @return {Array.} */ getRecentlyAdded(n = 10) { - return take(orderBy(this.all, 'date_created', 'desc'), n); + return take(orderBy(this.all, 'created_at', 'desc'), n); }, /**