Skip to content

Commit a7fbc93

Browse files
committed
scan
1 parent d952974 commit a7fbc93

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ app.get('/collect-sha/:sha', (req, res) => {
138138
})
139139
})
140140

141+
app.get('/scan/:ip', async (req, res) => {
142+
const ip = req.params.ip
143+
const items = await Item.findAll({
144+
where: {ip: ip}
145+
})
146+
console.log(JSON.stringify(items, null, 2))
147+
return res.json({items})
148+
})
149+
141150
const port = process.env.PORT || 4000;
142151
app.listen(port, async () => {
143152
console.log(`Waiting on port for someone :) ${port}`);

0 commit comments

Comments
 (0)