Skip to content

Commit

Permalink
Fix a few deprecation warnings and silence warnings for HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesname committed Aug 22, 2024
1 parent d4e9c02 commit da46677
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: scala
scala:
- 2.13.3
- 2.13.14

jdk:
openjdk8
Expand Down
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ val commonSettings = Seq(
"-Ywarn-unused:imports",
"-unchecked",
"-deprecation",
"-Wconf:cat=unused-imports&site=.*views.html.*:s", // Silence import warnings in Play html files
),

resolvers ++= additionalResolvers,
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/app/controllers/users/UserProfiles.scala
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ case class UserProfiles @Inject()(
Ok(views.html.admin.userProfile.list(request.page, request.params))
}

def `export`: Action[AnyContent] = AdminAction.async { implicit request =>
def exportInfo: Action[AnyContent] = AdminAction.async { implicit request =>
for {
accounts <- accounts.findAll(PageParams.empty.withoutLimit)
users <- userDataApi.list[UserProfile](PageParams.empty.withoutLimit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>@Messages("pagination.displayingItems", page.offset + 1, page.offset + page.
} {
@views.html.admin.common.sidebarActions { user =>
@views.html.admin.common.sidebarAction(user.hasPermission(ContentTypes.AuthoritativeSet, PermissionType.Create)) {
<a href="@controllers.sets.routes.AuthoritativeSets.create">
<a href="@controllers.sets.routes.AuthoritativeSets.create()">
<i class="fa fa-fw fa-plus-square-o"></i>
@Messages("authoritativeSet.create")
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</a>
}
@views.html.admin.common.sidebarAction(user.isAdmin) {
<a href="@controllers.users.routes.UserProfiles.export()">
<a href="@controllers.users.routes.UserProfiles.exportInfo()">
<i class="fa fa-fw fa-download"></i>
@Messages("userProfile.export")
</a>
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/conf/users.routes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

GET / @controllers.users.UserProfiles.search(params: services.search.SearchParams ?= services.search.SearchParams.empty, paging: utils.PageParams ?= utils.PageParams.empty)
GET /list @controllers.users.UserProfiles.list(paging: utils.PageParams ?= utils.PageParams.empty)
GET /export @controllers.users.UserProfiles.export()
GET /export @controllers.users.UserProfiles.exportInfo()
GET /create @controllers.users.UserProfiles.createUser()
POST /create @controllers.users.UserProfiles.createUserPost()
GET /syncDb @controllers.users.UserProfiles.syncFromDbPost()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
} else {
<script src="@controllers.portal.routes.PortalAssets.versioned("js/script-post.js")"></script>
}
<script src="@controllers.portal.routes.PortalData.jsRoutes"></script>
<script src="@controllers.portal.routes.PortalData.jsRoutes()"></script>
@extra
2 changes: 1 addition & 1 deletion test/integration/admin/EntityViewsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class EntityViewsSpec extends IntegrationTestRunner {
}

"allow exporting users" in new ITestApp {
val csv = FakeRequest(controllers.users.routes.UserProfiles.export())
val csv = FakeRequest(controllers.users.routes.UserProfiles.exportInfo())
.withUser(privilegedUser).call()
status(csv) must equalTo(OK)
header(HeaderNames.CONTENT_DISPOSITION, csv) must beSome.which { s =>
Expand Down

0 comments on commit da46677

Please sign in to comment.