Skip to content

Commit dcddfea

Browse files
authored
Merge pull request #1 from notEduardo/debug
debug logs
2 parents 5ac8942 + 030ae24 commit dcddfea

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/db/rateLimits.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ const updateRateLimit = async (key, timestamps) => {
2626
SET timestamps = $2
2727
WHERE key = $1;
2828
`;
29+
console.log('query', query);
2930
const values = [key, timestamps];
3031
const result = await db.query(query, values);
32+
console.log("result", result);
3133
return result.rows[0];
3234
};
3335

src/routes/rateLimitRoute.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ router.get('/rate-limits/:key', async (req, res, next) => {
3535
router.put('/rate-limits/:key', async (req, res, next) => {
3636
const { key } = req.params;
3737
const { timestamps } = req.body;
38+
console.log(req.body);
39+
console.log(key);
40+
console.log("-----------");
3841

3942
try {
4043
const updatedRateLimit = await rateLimits.updateRateLimit(key, timestamps);
44+
console.log("updatedRateLimit", updatedRateLimit);
4145
if (updatedRateLimit) {
4246
res.status(200).json(updatedRateLimit);
4347
} else {

0 commit comments

Comments
 (0)