Compare commits

...

2 Commits

Author SHA1 Message Date
nannal 186ae12263 remove i, do it before building
4 years ago
nannal 335ff230fd more open types
4 years ago

@ -9,6 +9,4 @@ EXPOSE 3000
WORKDIR /data
RUN "npm i"
CMD ["node", "index.js"]

@ -14,14 +14,9 @@ app.use(bodyParser.json(),function (req, res, next) {
})
app.get('/meta/blacklist', function (req, res) {
list.getAllBlack().then(r => {
res.send(JSON.stringify(r))
})
})
app.get('/meta/greylist', function (req, res) {
list.getAllGrey().then(r => {
app.get('/status/:status', function (req, res) {
list.getStatus(req.params.status).then(r => {
res.send(JSON.stringify(r))
})
})

@ -44,11 +44,8 @@ async function verifyMsg (obj, username) {
list = {
getAllBlack: async () => {
return await mongo.get("list","list",{"status": "black"})
},
getAllGrey: async () => {
return await mongo.get("list","list",{"status": "black"})
getStatus: async () => {
return await mongo.get("list","list",{"status": status})
},
getUser: async (username) => {
return await mongo.get("list","list",{"user": username})

Loading…
Cancel
Save