Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(clientapi): Change method signature. (#1583)
  • Loading branch information
Benjamin Geer committed Feb 5, 2020
1 parent 70b0841 commit c2a2559
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Expand Up @@ -41,7 +41,7 @@ import scala.concurrent.{ExecutionContext, Future}


object GroupsRouteADM {
val GroupsBasePath = PathMatcher("admin" / "groups")
val GroupsBasePath: PathMatcher[Unit] = PathMatcher("admin" / "groups")
val GroupsBasePathString: String = "/admin/groups"
}

Expand Down
Expand Up @@ -49,7 +49,7 @@ import scala.concurrent.{ExecutionContext, Future}
import scala.util.Try

object ProjectsRouteADM {
val ProjectsBasePath = PathMatcher("admin" / "projects")
val ProjectsBasePath: PathMatcher[Unit] = PathMatcher("admin" / "projects")
val ProjectsBasePathString = "/admin/projects"
}

Expand Down Expand Up @@ -82,7 +82,6 @@ class ProjectsRouteADM(routeData: KnoraRouteData) extends KnoraRoute(routeData)
// Classes used in client function definitions.

private val Project = classRef(OntologyConstants.KnoraAdminV2.ProjectClass.toSmartIri)
private val StoredProject = Project.toStoredClassRef
private val ProjectsResponse = classRef(OntologyConstants.KnoraAdminV2.ProjectsResponse.toSmartIri)
private val ProjectResponse = classRef(OntologyConstants.KnoraAdminV2.ProjectResponse.toSmartIri)
private val UpdateProjectRequest = classRef(OntologyConstants.KnoraAdminV2.UpdateProjectRequest.toSmartIri)
Expand Down
Expand Up @@ -44,7 +44,7 @@ import scala.concurrent.{ExecutionContext, Future}


object UsersRouteADM {
val UsersBasePath = PathMatcher("admin" / "users")
val UsersBasePath: PathMatcher[Unit] = PathMatcher("admin" / "users")
val UsersBasePathString: String = "/admin/users"
}

Expand Down Expand Up @@ -85,7 +85,6 @@ class UsersRouteADM(routeData: KnoraRouteData) extends KnoraRoute(routeData) wit
private val GroupsResponse = classRef(OntologyConstants.KnoraAdminV2.GroupsResponse.toSmartIri)
private val User = classRef(OntologyConstants.KnoraAdminV2.UserClass.toSmartIri)
private val UpdateUserRequest = classRef(OntologyConstants.KnoraAdminV2.UpdateUserRequest.toSmartIri)
private val StoredUser = User.toStoredClassRef

private val anythingUser1IriEnc = URLEncoder.encode(SharedTestDataADM.anythingUser1.id, "UTF-8")
private val multiUserIriEnc = URLEncoder.encode(SharedTestDataADM.multiuserUser.id, "UTF-8")
Expand Down Expand Up @@ -554,11 +553,12 @@ class UsersRouteADM(routeData: KnoraRouteData) extends KnoraRoute(routeData) wit

private val updateUserSystemAdminMembershipFunction: ClientFunction =
"updateUserSystemAdminMembership" description "Updates a user's SystemAdmin membership." params (
"user" description "The user to be updated." paramType StoredUser
"iri" description "The IRI of the user to be updated." paramType UriDatatype,
"systemAdmin" description "True if the user should be a system admin" paramType BooleanDatatype
) doThis {
httpPut(
path = str("iri") / argMember("user", "id") / str("SystemAdmin"),
body = Some(json("systemAdmin" -> argMember("user", "systemAdmin")))
path = str("iri") / arg("iri") / str("SystemAdmin"),
body = Some(json("systemAdmin" -> arg("systemAdmin")))
)
} returns UserResponse

Expand Down

0 comments on commit c2a2559

Please sign in to comment.