Skip to content

Commit

Permalink
fix: #12141, use apiv3 for category search module
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 31, 2023
1 parent 7d8f700 commit cefd406
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/src/modules/categorySearch.js
@@ -1,6 +1,6 @@
'use strict';

define('categorySearch', ['alerts', 'bootstrap'], function (alerts, bootstrap) {
define('categorySearch', ['alerts', 'bootstrap', 'api'], function (alerts, bootstrap, api) {
const categorySearch = {};

categorySearch.init = function (el, options) {
Expand Down Expand Up @@ -70,15 +70,15 @@ define('categorySearch', ['alerts', 'bootstrap'], function (alerts, bootstrap) {
});

function loadList(search, callback) {
socket.emit('categories.categorySearch', {
api.get('/search/categories', {
search: search,
query: utils.params(),
parentCid: options.parentCid || 0,
selectedCids: options.selectedCids,
privilege: options.privilege,
states: options.states,
showLinks: options.showLinks,
}, function (err, categories) {
}, function (err, { categories }) {
if (err) {
return alerts.error(err);
}
Expand Down

0 comments on commit cefd406

Please sign in to comment.