DONE AGAIN
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { setResp403, setResp500 } from '../../helpers/http.js'
|
||||
import { setResp500 } from '../../helpers/http.js'
|
||||
import NotesService from '../../services/NotesService.js'
|
||||
|
||||
/**
|
||||
@@ -7,17 +7,6 @@ import NotesService from '../../services/NotesService.js'
|
||||
*/
|
||||
const db = new NotesService()
|
||||
|
||||
/**
|
||||
*
|
||||
* @param req
|
||||
* @param res
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export const setForbidden = async (req, res) => {
|
||||
const ip = req.headers['x-real-ip'] || req.connection.remoteAddress
|
||||
res.status(403).json(setResp403(`You are not allowed to access the resource. Your IP is ${ip}`))
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param req
|
||||
|
||||
Reference in New Issue
Block a user