Use Factory for Phrasen

This commit is contained in:
cgfhtw
2024-03-06 16:52:10 +01:00
parent f2ebf25640
commit 1dcece8563
+2 -2
View File
@@ -25,8 +25,8 @@ const phrasen = {
if (Array.isArray(category))
return Promise.all(category.map(cat => this.loadCategory(cat)));
if (!loadingModules[category])
loadingModules[category] = this.config.globalProperties.$fhcApi
.get('/api/frontend/v1/phrasen/loadModule/' + category)
loadingModules[category] = this.config.globalProperties
.$fhcApi.factory.phrasen.loadCategory(category)
.then(res => res?.data ? extractCategory(res.data, category) : {})
.then(res => {
categories[category] = res;