more open types
This commit is contained in:
parent
97296c8d1c
commit
335ff230fd
9
index.js
9
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) {
|
app.get('/status/:status', function (req, res) {
|
||||||
list.getAllGrey().then(r => {
|
list.getStatus(req.params.status).then(r => {
|
||||||
res.send(JSON.stringify(r))
|
res.send(JSON.stringify(r))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -44,11 +44,8 @@ async function verifyMsg (obj, username) {
|
|||||||
|
|
||||||
|
|
||||||
list = {
|
list = {
|
||||||
getAllBlack: async () => {
|
getStatus: async () => {
|
||||||
return await mongo.get("list","list",{"status": "black"})
|
return await mongo.get("list","list",{"status": status})
|
||||||
},
|
|
||||||
getAllGrey: async () => {
|
|
||||||
return await mongo.get("list","list",{"status": "black"})
|
|
||||||
},
|
},
|
||||||
getUser: async (username) => {
|
getUser: async (username) => {
|
||||||
return await mongo.get("list","list",{"user": username})
|
return await mongo.get("list","list",{"user": username})
|
||||||
|
Loading…
Reference in New Issue
Block a user