feat: Add search functionality for public portal (#5683)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
bce0bb8acb
commit
1fb1be3ddc
14
app/javascript/portal/api/article.js
Normal file
14
app/javascript/portal/api/article.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user