Skip to content

Commit

Permalink
cleanup ChangePermissionResourceClassApiRequestADM
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone committed Nov 14, 2024
1 parent c6957c0 commit 92c2e5f
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,7 @@ object ChangePermissionHasPermissionsApiRequestADM {
*
* @param forResourceClass the new resource class IRI of the doap permission.
*/
case class ChangePermissionResourceClassApiRequestADM(forResourceClass: IRI) {
if (forResourceClass.isEmpty) {
throw BadRequestException(s"Resource class IRI cannot be empty.")
}
Iri
.validateAndEscapeIri(forResourceClass)
.getOrElse(
throw BadRequestException(s"Invalid resource class IRI $forResourceClass is given."),
)
}
case class ChangePermissionResourceClassApiRequestADM(forResourceClass: String)
object ChangePermissionResourceClassApiRequestADM {
implicit val codec: JsonCodec[ChangePermissionResourceClassApiRequestADM] =
DeriveJsonCodec.gen[ChangePermissionResourceClassApiRequestADM]
Expand Down

0 comments on commit 92c2e5f

Please sign in to comment.