Skip to content

Commit 4622b18

Browse files
committed
sha unique
1 parent 62d8e97 commit 4622b18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ app.get('/add-sha/:sha', (req, res) => {
108108
app.get('/collect-sha/:sha', async (req, res) => {
109109
const ip = req.headers['x-forwarded-for']
110110
const item = await Item.findOne({where: { sha: req.params.sha }})
111-
if (item !== null) {
111+
if (item.sha.length > 2) {
112112
return res.json({message: "visited"})
113113
} else {
114114
console.log(JSON.stringify(item, null, 2))

0 commit comments

Comments
 (0)