added new 400 status messages
This commit is contained in:
parent
d2cf9eb561
commit
fc2501e7b0
@ -9,6 +9,12 @@ const db = new sqlite3.Database("../blocks.db", sqlite3.OPEN_READONLY, err => {
|
|||||||
|
|
||||||
app.listen(PORT, "127.0.0.1", () => console.log("API started on http://127.0.0.1:"+PORT));
|
app.listen(PORT, "127.0.0.1", () => console.log("API started on http://127.0.0.1:"+PORT));
|
||||||
app.get("/", (req, res) => {
|
app.get("/", (req, res) => {
|
||||||
|
res.status(400).send({"message":"use /blocker or /blocked endpoint"});
|
||||||
|
});
|
||||||
|
app.get("/blocker", (req, res) => {
|
||||||
|
res.status(400).send({"message":"insert a domain"});
|
||||||
|
});
|
||||||
|
app.get("/blocked", (req, res) => {
|
||||||
res.status(400).send({"message":"insert a domain"});
|
res.status(400).send({"message":"insert a domain"});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user