Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
eletallbetagouv committed Feb 11, 2025
1 parent 5e57c1f commit 3617ab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/controllers/AdminController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ class AdminController(
} yield NoContent
}

def blackListedIPs() = Act.secured.superAdmins.async { _ =>
def getBlacklistedIps() = Act.secured.superAdmins.async { _ =>
ipBlackListRepository.list().map(blackListedIps => Ok(Json.toJson(blackListedIps)))
}

def deleteBlacklistedIp(ip: String) = Act.secured.superAdmins.async { _ =>
ipBlackListRepository.delete(ip).map(_ => NoContent)
}

def createBlacklistedIp() =
def addBlacklistedIp() =
Act.secured.superAdmins.async(parse.json) { implicit request =>
for {
blacklistedIpRequest <- request.parseBody[BlackListedIp]()
Expand Down
4 changes: 2 additions & 2 deletions conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ POST /api/admin/test-pdf controller
POST /api/admin/regen-sample-data controllers.AdminController.regenSampleData()
POST /api/admin/emails/resend controllers.AdminController.resendEmails(start: OffsetDateTime, end: OffsetDateTime, emailType: models.ResendEmailType)
DELETE /api/reports controllers.ReportController.deleteSpamReport()
GET /api/blacklisted-ips controllers.AdminController.blackListedIPs()
POST /api/blacklisted-ips controllers.AdminController.createBlacklistedIp()
GET /api/blacklisted-ips controllers.AdminController.getBlacklistedIps()
POST /api/blacklisted-ips controllers.AdminController.addBlacklistedIp()
DELETE /api/blacklisted-ips/:ip controllers.AdminController.deleteBlacklistedIp(ip: String)

##############################
Expand Down

0 comments on commit 3617ab4

Please sign in to comment.