feat: logs

This commit is contained in:
Wojtek Rybakiewicz
2023-10-25 15:23:27 +02:00
parent 34f3f8c82e
commit b10088cb54
3 changed files with 4 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- lambda-with-metrics
jobs:
build:

View File

@@ -94,6 +94,7 @@ export const packages = (router: Router) => {
router.get(
"/packages/latest",
asyncHandler(async (req, res) => {
console.log("Getting latest packages")
const initialMongoQuery = {};
return await findPackage(req, res, initialMongoQuery);
})
@@ -109,7 +110,7 @@ export const packages = (router: Router) => {
if (!req.query.toTimestamp) {
throw new Error("toTimestamp query param is required");
}
console.log("Getting packages by timestamp")
const initialMongoQuery = {
timestamp: { $lte: req.query.toTimestamp },
};

View File

@@ -276,6 +276,7 @@ export const prices = (router: Router) => {
eventProps: params,
ip: getIp(req),
});
console.log("Getting prices")
// Getting provider details
const providerDetails = await getProviderFromParams(params);