Update plugins/antiban.js
Browse files- plugins/antiban.js +30 -1
plugins/antiban.js
CHANGED
@@ -18,7 +18,7 @@ const protectedUsers = [6477856957, 1191668125, 1448273246, 1054295664, 64443056
|
|
18 |
* required: true
|
19 |
* description: null
|
20 |
* schema:
|
21 |
-
* type:
|
22 |
* - in: header
|
23 |
* name: x-api-key
|
24 |
* required: true
|
@@ -39,6 +39,35 @@ AntibanRoutes.get("/api/v1/user/creation-date", authenticateApiKey, apiLimiter,
|
|
39 |
res.json({ user_id: userId, estimated_creation: result });
|
40 |
});
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
AntibanRoutes.post("/api/v1/user/ban-user", authenticateApiKey, apiLimiter, async (req, res) => {
|
43 |
const dbClient = new Database("AkenoXJs");
|
44 |
const collection = dbClient.collection("ban_users");
|
|
|
18 |
* required: true
|
19 |
* description: null
|
20 |
* schema:
|
21 |
+
* type: number
|
22 |
* - in: header
|
23 |
* name: x-api-key
|
24 |
* required: true
|
|
|
39 |
res.json({ user_id: userId, estimated_creation: result });
|
40 |
});
|
41 |
|
42 |
+
/**
|
43 |
+
* @swagger
|
44 |
+
* /api/v1/user/ban-user:
|
45 |
+
* get:
|
46 |
+
* summary: Telegram Ban User
|
47 |
+
* tags: [User]
|
48 |
+
* parameters:
|
49 |
+
* - in: query
|
50 |
+
* name: user_id
|
51 |
+
* required: true
|
52 |
+
* description: null
|
53 |
+
* schema:
|
54 |
+
* type: number
|
55 |
+
* - in: query
|
56 |
+
* name: reason
|
57 |
+
* required: false
|
58 |
+
* description: null
|
59 |
+
* schema:
|
60 |
+
* type: string
|
61 |
+
* - in: header
|
62 |
+
* name: x-api-key
|
63 |
+
* required: true
|
64 |
+
* description: API key for authentication
|
65 |
+
* schema:
|
66 |
+
* type: string
|
67 |
+
* responses:
|
68 |
+
* 200:
|
69 |
+
* description: Success
|
70 |
+
*/
|
71 |
AntibanRoutes.post("/api/v1/user/ban-user", authenticateApiKey, apiLimiter, async (req, res) => {
|
72 |
const dbClient = new Database("AkenoXJs");
|
73 |
const collection = dbClient.collection("ban_users");
|