mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Removed jQuery and replaced axios with fetch
This commit is contained in:
@@ -113,11 +113,13 @@ const methods = {
|
||||
*/
|
||||
getSuggestions(input, params) {
|
||||
params.search = input;
|
||||
let cacheKey = `${this.url}:${JSON.stringify(params)}`;
|
||||
const cacheKey = `${this.url}:${JSON.stringify(params)}`;
|
||||
|
||||
if (typeof ajaxCache[cacheKey] !== "undefined") return Promise.resolve(ajaxCache[cacheKey]);
|
||||
if (typeof ajaxCache[cacheKey] !== "undefined") {
|
||||
return Promise.resolve(ajaxCache[cacheKey]);
|
||||
}
|
||||
|
||||
return this.$http.get(this.url, {params}).then(resp => {
|
||||
return this.$http.get(this.url, params).then(resp => {
|
||||
ajaxCache[cacheKey] = resp.data;
|
||||
return resp.data;
|
||||
});
|
||||
|
Reference in New Issue
Block a user