Chatwoot/app/javascript/portal/api/article.js
Nithin David Thomas 1fb1be3ddc
feat: Add search functionality for public portal (#5683)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 17:09:32 -07:00

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();