eb2cb9e921
* refactor(faq): fetch from API on web Also make question list more maintainable, allowing different questions across platforms * fix(tests): don't return null when function is expected Also removes the unnecessary default to web in controller * fix(tests): add new fields to expectation, add placeholders * refactor(faq): allow reordering Co-authored-by: SabreCat <sabe@habitica.com>
8 lines
176 B
JavaScript
8 lines
176 B
JavaScript
import axios from 'axios';
|
|
|
|
export async function getFAQ () {
|
|
const url = '/api/v4/faq?platform=web';
|
|
const response = await axios.get(url);
|
|
return response.data.data;
|
|
}
|