File size: 523 Bytes
7cb4551
 
 
 
 
 
 
 
2874b80
8e0d35e
7cb4551
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import express from 'express';
import { Database } from '../database/database.js';
const UnblockIpRoutes = express.Router();

UnblockIpRoutes.get('/api/v1/unblock-ip', async (req, res) => {
    const dbClient = new Database("AkenoXJs", "FastJsAPI");
    try {
        const ip = req.query.ip;
        const results = await dbClient.UnblockedIp(ip);
        res.json({ message: "successfully ip unbanned"});
    } catch (error) {
        res.status(500).json({ error: error.message });
    }
});

export { UnblockIpRoutes };