refactor(front): rename logger timing stop functions to `measureLoading`
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2535>
This commit is contained in:
parent
d1f9a99e1b
commit
9abdcb5ff7
|
@ -64,7 +64,7 @@ const fetchFavorites = async () => {
|
|||
ordering: orderingString.value
|
||||
}
|
||||
|
||||
const stop = logger.time('Loading user favorites')
|
||||
const measureLoading = logger.time('Loading user favorites')
|
||||
try {
|
||||
const response = await axios.get('tracks/', { params })
|
||||
|
||||
|
@ -81,7 +81,7 @@ const fetchFavorites = async () => {
|
|||
} catch (error) {
|
||||
useErrorHandler(error as Error)
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ const fetchData = async () => {
|
|||
content_category: 'music'
|
||||
}
|
||||
|
||||
const stop = logger.time('Fetching albums')
|
||||
const measureLoading = logger.time('Fetching albums')
|
||||
try {
|
||||
const response = await axios.get('albums/', {
|
||||
params,
|
||||
|
@ -86,7 +86,7 @@ const fetchData = async () => {
|
|||
useErrorHandler(error as Error)
|
||||
result.value = undefined
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ const fetchData = async () => {
|
|||
has_albums: excludeCompilation.value
|
||||
}
|
||||
|
||||
const stop = logger.time('Fetching artists')
|
||||
const measureLoading = logger.time('Fetching artists')
|
||||
try {
|
||||
const response = await axios.get('artists/', {
|
||||
params,
|
||||
|
@ -87,7 +87,7 @@ const fetchData = async () => {
|
|||
useErrorHandler(error as Error)
|
||||
result.value = undefined
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ const labels = computed(() => ({
|
|||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
isLoading.value = true
|
||||
const stop = logger.time('Loading latest artists')
|
||||
const measureLoading = logger.time('Loading latest artists')
|
||||
|
||||
const params = {
|
||||
ordering: '-creation_date',
|
||||
|
@ -47,7 +47,7 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
isLoading.value = false
|
||||
stop()
|
||||
measureLoading()
|
||||
}
|
||||
|
||||
fetchData()
|
||||
|
|
|
@ -74,7 +74,7 @@ const fetchData = async () => {
|
|||
content_category: 'podcast'
|
||||
}
|
||||
|
||||
const stop = logger.time('Fetching podcasts')
|
||||
const measureLoading = logger.time('Fetching podcasts')
|
||||
try {
|
||||
const response = await axios.get('artists/', {
|
||||
params,
|
||||
|
@ -88,7 +88,7 @@ const fetchData = async () => {
|
|||
useErrorHandler(error as Error)
|
||||
result.value = undefined
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ const fetchData = async () => {
|
|||
ordering: orderingString.value
|
||||
}
|
||||
|
||||
const stop = logger.time('Fetching radios')
|
||||
const measureLoading = logger.time('Fetching radios')
|
||||
try {
|
||||
const response = await axios.get('radios/radios/', {
|
||||
params
|
||||
|
@ -75,7 +75,7 @@ const fetchData = async () => {
|
|||
useErrorHandler(error as Error)
|
||||
result.value = undefined
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ const fetchData = async () => {
|
|||
playable: true
|
||||
}
|
||||
|
||||
const stop = logger.time('Fetching albums')
|
||||
const measureLoading = logger.time('Fetching albums')
|
||||
try {
|
||||
const response = await axios.get('playlists/', {
|
||||
params
|
||||
|
@ -76,7 +76,7 @@ const fetchData = async () => {
|
|||
useErrorHandler(error as Error)
|
||||
result.value = undefined
|
||||
} finally {
|
||||
stop()
|
||||
measureLoading()
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue