Skip to content

Commit

Permalink
Add logs to the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuhal-Ayob committed Dec 4, 2023
1 parent 2b68591 commit 67d1313
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/models/classes/establishment.js
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@ class Establishment extends EntityValidator {
}

const fetchResults = await models.establishment.findOne(fetchQuery);
console.log({ fetchResults: fetchResults });

Check warning on line 1296 in server/models/classes/establishment.js

View check run for this annotation

Codecov / codecov/patch

server/models/classes/establishment.js#L1296

Added line #L1296 was not covered by tests
if (fetchResults && fetchResults.id && Number.isInteger(fetchResults.id)) {
// update self - don't use setters because they modify the change state
this._isNew = false;
Expand Down
6 changes: 6 additions & 0 deletions server/services/establishment/establishment.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ const getEstablishment = async (req, res) => {
const showPropertyHistoryOnly = req.query.history === 'property';

const thisEstablishment = new Establishment.Establishment(req.username);
console.log({

Check warning on line 201 in server/services/establishment/establishment.js

View check run for this annotation

Codecov / codecov/patch

server/services/establishment/establishment.js#L201

Added line #L201 was not covered by tests
thisEstablishment: thisEstablishment,
establishmentId: establishmentId,
showHistory: showHistory,
history: req.query.history,
});
try {
if (await thisEstablishment.restore(establishmentId, showHistory && req.query.history !== 'property')) {
// the property based framework for "other services" and "capacity services"
Expand Down

0 comments on commit 67d1313

Please sign in to comment.