Files
habitica/website/client/src/store/actions/faq.js
T
Sabe Jones eb2cb9e921 Refactor FAQ (#14372)
* 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>
2022-12-15 11:34:07 -06:00

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;
}