fix: Update map with tables fixes
This commit is contained in:
@@ -109,7 +109,8 @@ class ArticlesStore {
|
||||
|
||||
getArticles = async (language: Language) => {
|
||||
this.articleLoading = true;
|
||||
const response = await authInstance.get("/article");
|
||||
|
||||
const response = await languageInstance(language).get("/article");
|
||||
|
||||
runInAction(() => {
|
||||
this.articles[language] = response.data;
|
||||
@@ -119,8 +120,9 @@ class ArticlesStore {
|
||||
|
||||
getArticle = async (id: number, language?: Language) => {
|
||||
this.articleLoading = true;
|
||||
let response: any;
|
||||
if (language) {
|
||||
const response = await languageInstance(language).get(`/article/${id}`);
|
||||
response = await languageInstance(language).get(`/article/${id}`);
|
||||
runInAction(() => {
|
||||
if (!this.articleData) {
|
||||
this.articleData = { id, heading: "", body: "", service_name: "" };
|
||||
@@ -131,11 +133,12 @@ class ArticlesStore {
|
||||
};
|
||||
});
|
||||
} else {
|
||||
const response = await authInstance.get(`/article/${id}`);
|
||||
response = await authInstance.get(`/article/${id}`);
|
||||
runInAction(() => {
|
||||
this.articleData = response.data;
|
||||
});
|
||||
}
|
||||
return response;
|
||||
this.articleLoading = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user