feat: sort subscriptions
All checks were successful
repod / xml (push) Successful in 15s
repod / php (push) Successful in 50s
repod / nodejs (push) Successful in 2m3s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-01-16 14:36:51 +01:00
parent 61f865da52
commit 25c6c515e0

View File

@ -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))
},
},
}