fix: loading labels after login

This commit is contained in:
kolaente 2021-10-17 17:06:28 +02:00
parent ae971b23bc
commit 1d46b85170
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -4,8 +4,8 @@ import { success } from '@/message'
import {i18n} from '@/i18n' import {i18n} from '@/i18n'
import {getLabelsByIds, filterLabelsByQuery} from '@/helpers/labels' import {getLabelsByIds, filterLabelsByQuery} from '@/helpers/labels'
const labelService = new LabelService()
async function getAllLabels(page = 1) { async function getAllLabels(page = 1) {
const labelService = new LabelService()
const labels = await labelService.getAll({}, {}, page) const labels = await labelService.getAll({}, {}, page)
if (page < labelService.totalPages) { if (page < labelService.totalPages) {
const nextLabels = await getAllLabels(page + 1) const nextLabels = await getAllLabels(page + 1)