feat: sort subscriptions
This commit is contained in:
parent
61f865da52
commit
25c6c515e0
@ -14,7 +14,8 @@ export const subscriptions = {
|
|||||||
actions: {
|
actions: {
|
||||||
fetch: async (context) => {
|
fetch: async (context) => {
|
||||||
const metrics = await axios.get(generateUrl('/apps/gpoddersync/personal_settings/metrics'))
|
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