Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ app.get('/qrlist', (req, res) => {
.filter(item => item.uuid !== '')
.filter(item => item.uuid !== undefined)
.sort((a, b) => (a.floor === b.floor ? 0 : +(a.floor > b.floor) || -1));
qrList.forEach(item => item.qr = qr.imageSync('http://url.coderbunker.com/' + item.uuid, { type: 'svg' }));
qrList.forEach(item => item.qr = qr.imageSync(item.uuid, { type: 'svg' }));
res.render('qrList', { matches: qrList });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break behaviour , it should be / instead of

Besides, it's off topic with the current branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix that, in which case it won't work ? I need to reproduce it so that I ensure the change will fix that case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if current page is not root folder then it will assume the uuid is a subfolder

});
});
Expand All @@ -75,6 +75,9 @@ app.get('/:uuid', (req, res) => {
return;
}
logScanned(req.params.uuid, matches);
if (matches.length >= 1) {
console.log(`Too much matches for uuid ${req.params.uuid} length = ${matches.length}`);
}
matches[0].similarItems = searchDatabase({ fixture: matches[0].fixture }, allItems)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off topic

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps amateur questions, but why remove the hard URL and how else do we get a link to work?

.filter(item => item.uuid !== matches[0].uuid)
.splice(0, 3);
Expand Down