mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-28 01:32:49 +01:00
feat: sort subscriptions
This commit is contained in:
parent
61f865da52
commit
25c6c515e0
@ -14,7 +14,8 @@ export const subscriptions = {
|
||||
actions: {
|
||||
fetch: async (context) => {
|
||||
const metrics = await axios.get(generateUrl('/apps/gpoddersync/personal_settings/metrics'))
|
||||
context.commit('set', metrics.data.subscriptions.map(sub => sub.url))
|
||||
const subs = [...metrics.data.subscriptions].sort((a, b) => b.listenedSeconds - a.listenedSeconds)
|
||||
context.commit('set', subs.map(sub => sub.url))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user