1fb1be3ddc
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
14 lines
305 B
JavaScript
14 lines
305 B
JavaScript
import axios from 'axios';
|
|
|
|
class ArticlesAPI {
|
|
constructor() {
|
|
this.baseUrl = '';
|
|
}
|
|
|
|
searchArticles(portalSlug, locale, query) {
|
|
let baseUrl = `${this.baseUrl}/hc/${portalSlug}/${locale}/articles.json?query=${query}`;
|
|
return axios.get(baseUrl);
|
|
}
|
|
}
|
|
|
|
export default new ArticlesAPI();
|