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 }; |