Skip to content

Commit

Permalink
Whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
ftab committed Aug 4, 2024
1 parent 6afab4f commit 4f7f6c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion services/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const helper = require('../helper');
const config = require('../config');

const sql = `SELECT nickname, COUNT(DISTINCT videoId) AS video_count FROM user_video
INNER JOIN ircbot.user ON ircbot.user_video.userId = ircbot.user.userId GROUP BY user_video.userId
INNER JOIN user ON user_video.userId = user.userId GROUP BY user_video.userId
ORDER BY video_count DESC LIMIT ?,?`;

async function get(page = 1){
Expand Down
3 changes: 1 addition & 2 deletions services/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ async function getMultiple(page = 1){
[offset, config.listPerPage]
);
const total = await db.query(
`SELECT COUNT(*) AS numRows FROM user`,
[userid]
`SELECT COUNT(*) AS numRows FROM user`
);
const data = helper.emptyOrRows(rows);
const perPage = config.listPerPage;
Expand Down

0 comments on commit 4f7f6c7

Please sign in to comment.