Skip to content

Commit 375a58b

Browse files
committed
fix(keyUpdater): removes restriction of 1 key per year
1 parent c6e6058 commit 375a58b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

controllers/keyHolders.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ export const addHolder = async (req, res) => {
99
const yearPrefix = enroll_num_str.substring(0, 2);
1010

1111
try {
12-
const doesExist = await pool.query(
13-
'SELECT * FROM keyHolders WHERE CAST(enrollment_num AS TEXT) ~ $1',
14-
[`^${yearPrefix}`]
15-
);
16-
17-
if (doesExist && doesExist.rowCount > 0) {
18-
await pool.query(
19-
'DELETE FROM keyHolders WHERE CAST(enrollment_num AS TEXT) ~ $1',
20-
[`^${yearPrefix}`]
21-
);
22-
}
12+
// const doesExist = await pool.query(
13+
// 'SELECT * FROM keyHolders WHERE CAST(enrollment_num AS TEXT) ~ $1',
14+
// [`^${yearPrefix}`]
15+
// );
16+
17+
// if (doesExist && doesExist.rowCount > 0) {
18+
// await pool.query(
19+
// 'DELETE FROM keyHolders WHERE CAST(enrollment_num AS TEXT) ~ $1',
20+
// [`^${yearPrefix}`]
21+
// );
22+
// }
2323
const memberDetails = await pool.query(
2424
'SELECT slack_name, enrollment_num, bhawan FROM members_info WHERE enrollment_num = $1',
2525
[enroll_num]

controllers/labBot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const postMessageToSlack = async (message) => {
228228
}, {
229229
headers: {
230230
'Content-Type': 'application/json',
231-
'Authorization': `Bearer ${SLACK_TOKEN}`,
231+
'Authorization': `Bearer ${BotToken}`,
232232
},
233233
});
234234
} catch (error) {

0 commit comments

Comments
 (0)