Update plugins/antiban.js
Browse files- plugins/antiban.js +23 -0
plugins/antiban.js
CHANGED
@@ -6,6 +6,29 @@ const AntibanRoutes = express.Router();
|
|
6 |
|
7 |
const protectedUsers = [6477856957, 1191668125, 1448273246, 1054295664, 6444305696];
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
AntibanRoutes.get("/api/v1/user/creation-date", authenticateApiKey, apiLimiter, (req, res) => {
|
10 |
const userId = Number(req.query.user_id);
|
11 |
if (!userId || isNaN(userId)) {
|
|
|
6 |
|
7 |
const protectedUsers = [6477856957, 1191668125, 1448273246, 1054295664, 6444305696];
|
8 |
|
9 |
+
/**
|
10 |
+
* @swagger
|
11 |
+
* /api/v1/user/creation-date:
|
12 |
+
* get:
|
13 |
+
* summary: Telegram creation date User
|
14 |
+
* tags: [User]
|
15 |
+
* parameters:
|
16 |
+
* - in: query
|
17 |
+
* name: user_id
|
18 |
+
* required: true
|
19 |
+
* description: null
|
20 |
+
* schema:
|
21 |
+
* type: string
|
22 |
+
* - in: header
|
23 |
+
* name: x-api-key
|
24 |
+
* required: true
|
25 |
+
* description: API key for authentication
|
26 |
+
* schema:
|
27 |
+
* type: string
|
28 |
+
* responses:
|
29 |
+
* 200:
|
30 |
+
* description: Success
|
31 |
+
*/
|
32 |
AntibanRoutes.get("/api/v1/user/creation-date", authenticateApiKey, apiLimiter, (req, res) => {
|
33 |
const userId = Number(req.query.user_id);
|
34 |
if (!userId || isNaN(userId)) {
|