DONE AGAIN

This commit is contained in:
2021-10-15 02:15:38 +03:00
parent ade92e0493
commit 32d7e45670
4 changed files with 23 additions and 42 deletions

View File

@@ -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