Skip to content

Commit

Permalink
fix: lint and log
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Sep 6, 2023
1 parent 80186f1 commit a4ef201
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/api/lib/controllers/boxesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ const postNewBox = async function postNewBox (req, res) {
grantBadge({
badgeClassEntityId: '4xqx4qjfTwOSiK816Lr2tg',
user: req.user.email,
issuerEntityId: "oERPzHYrSKC8Cwxx3-IewA",
issuerEntityId: 'oERPzHYrSKC8Cwxx3-IewA',
});
} catch (err) {
return handleError(err);
Expand Down
22 changes: 12 additions & 10 deletions packages/api/lib/helpers/badgrQuery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { Queue } = require("bullmq");
'use strict';

const { Queue } = require('bullmq');
const config = require('config').get('badgr-queue')

Check failure on line 4 in packages/api/lib/helpers/badgrQuery.js

View workflow job for this annotation

GitHub Actions / Lint code

Missing semicolon

let queue;
Expand All @@ -7,13 +9,13 @@ const requestQueue = () => {
if (queue) {
return queue;
}
queue = new Queue(config.get("queue-name"), {
queue = new Queue(config.get('queue-name'), {
connection: {
host: config.get("redis.host"),
port: config.get("redis.port"),
username: config.get("redis.username"),
password: config.get("redis.password"),
db: config.get("redis.db"),
host: config.get('redis.host'),
port: config.get('redis.port'),
username: config.get('redis.username'),
password: config.get('redis.password'),
db: config.get('redis.db'),
},
});

Expand All @@ -30,12 +32,12 @@ module.exports = {
};

return requestQueue()
.add("grant-badge", payload, {
.add('grant-badge', payload, {
removeOnComplete: true,
})
.then((response) => {
log.info({
msg: "Successfully granted badge to user",
console.log({

Check failure on line 39 in packages/api/lib/helpers/badgrQuery.js

View workflow job for this annotation

GitHub Actions / Lint code

Unexpected console statement
msg: 'Successfully granted badge to user',
job_id: response.id,
template: response.name,
});
Expand Down

0 comments on commit a4ef201

Please sign in to comment.