Skip to content

Commit

Permalink
adding comments and console.logs to test
Browse files Browse the repository at this point in the history
  • Loading branch information
zanzoonh committed Oct 3, 2024
1 parent ef89581 commit c1f2183
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
Binary file modified dump.rdb
Binary file not shown.
10 changes: 7 additions & 3 deletions public/src/client/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ define('forum/category', [
'hooks',
'alerts',
'api',
], function (infinitescroll, share, navigator, topicList, sort, categorySelector, hooks, alerts, api) {
'benchpress',
], function (infinitescroll, share, navigator, topicList, sort, categorySelector, hooks, alerts, api, Benchpress) {
const Category = {};

$(window).on('action:ajaxify.start', function (ev, data) {
Expand Down Expand Up @@ -211,7 +212,7 @@ define('forum/category', [
return utils.param('section') || '';
}

function renderSearchResults(data) {
function renderSearchResults(data, options) {
Benchpress.render('partials/paginator', { pagination: data.pagination }).then(function (html) {
$('.pagination-container').replaceWith(html);
});
Expand All @@ -221,7 +222,10 @@ define('forum/category', [
}

data.isAdminOrGlobalMod = app.user.isAdmin || app.user.isGlobalMod;
app.parseAndTranslate('posts_list', 'topics', data, function (html) {
app.parseAndTranslate(options.template, {
categoryItems: categories.slice(0, 200),

Check failure on line 226 in public/src/client/category.js

View workflow job for this annotation

GitHub Actions / test

'categories' is not defined
selectedCategory: ajaxify.data.selectedCategory,
allCategoriesUrl: ajaxify.data.allCategoriesUrl}, function (html) {

Check failure on line 228 in public/src/client/category.js

View workflow job for this annotation

GitHub Actions / test

Expected a line break before this closing brace

Check failure on line 228 in public/src/client/category.js

View workflow job for this annotation

GitHub Actions / test

A space is required before '}'
$('#category-container').html(html);
html.find('.timeago').timeago();
$('[component="topic/search/icon"]').addClass('fa-search').removeClass('fa-spinner fa-spin');
Expand Down
2 changes: 2 additions & 0 deletions public/src/modules/categorySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ define('categorySearch', ['alerts', 'bootstrap', 'api'], function (alerts, boots
});

function loadList(search, callback) {
console.log('caategories loadlist');
console.log('did it call search??');
api.get('/search/categories', {
search: search,
query: utils.params(),
Expand Down
2 changes: 2 additions & 0 deletions src/api/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const socketHelpers = require('../socket.io/helpers');

const postsAPI = module.exports;

console.log('posts api gets called');

postsAPI.get = async function (caller, data) {
const [userPrivileges, post, voted] = await Promise.all([
privileges.posts.get([data.pid], caller.uid),
Expand Down
1 change: 0 additions & 1 deletion src/api/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const socketHelpers = require('../socket.io/helpers');
const topicsAPI = module.exports;


console.log('trying ot gr here');
topicsAPI._checkThumbPrivileges = async function ({ tid, uid }) {
// req.params.tid could be either a tid (pushing a new thumb to an existing topic)
// or a post UUID (a new topic being composed)
Expand Down
1 change: 1 addition & 0 deletions src/categories/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const db = require('../database');

module.exports = function (Categories) {
Categories.search = async function (data) {
console.log('it called categories search');
const query = data.query || '';
const page = data.page || 1;
const uid = data.uid || 0;
Expand Down

0 comments on commit c1f2183

Please sign in to comment.