fix(faq): add language query in FAQ store action. (#15079)

Co-authored-by: Sabe Jones <sabe@habitica.com>
This commit is contained in:
KasaHNO3 2024-01-11 07:00:13 +08:00 committed by GitHub
parent e5b873c9aa
commit 8b2e13b5fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,9 @@
import axios from 'axios';
export async function getFAQ () {
const url = '/api/v4/faq?platform=web';
export async function getFAQ (store) {
const currentLocale = store.state.i18n.selectedLanguage.code;
const url = `/api/v4/faq?platform=web&language=${currentLocale}`;
const response = await axios.get(url);
return response.data.data;
}