Skip to content

Commit

Permalink
Merge branch 'release-4.7.0' into sl-4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
krgauraw committed Feb 1, 2022
2 parents a8cace1 + 4a9ee36 commit 8e2be12
Show file tree
Hide file tree
Showing 15 changed files with 336 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class TestContentActor extends BaseSpec with MockFactory {
}))

val request = getContentRequest()
request.getRequest.putAll( mapAsJavaMap(Map("channel"-> "in.ekstep","name" -> "New Content", "code" -> "1234", "mimeType"-> "application/vnd.ekstep.content-collection", "contentType" -> "Course", "primaryCategory" -> "Learning Resource", "channel" -> "in.ekstep", "targetBoardIds" -> new util.ArrayList[String](){{add("ncf_board_cbse")}})))
request.getRequest.putAll( mapAsJavaMap(Map("channel"-> "in.ekstep","name" -> "New", "code" -> "1234", "mimeType"-> "application/vnd.ekstep.content-collection", "contentType" -> "Course", "primaryCategory" -> "Learning Resource", "channel" -> "in.ekstep", "targetBoardIds" -> new util.ArrayList[String](){{add("ncf_board_cbse")}})))
request.setOperation("createContent")
val response = callActor(request, Props(new ContentActor()))
assert(response.get("identifier") != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AssetController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentActor:
content.putAll(Map("identifier" -> identifier, "type" -> `type`.getOrElse("assets")).asJava)
val contentRequest = getRequest(content, headers, "uploadPreSignedUrl")
setRequestContext(contentRequest, version, objectType, schemaName)
getResult(ApiId.UPLOAD_PRE_SIGNED_ASSET, contentActor, contentRequest)
getResult(ApiId.UPLOAD_PRE_SIGNED_ASSET, contentActor, contentRequest, version = apiVersion)
}

def copy(identifier: String) = Action.async { implicit request =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CollectionController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentAc
val contentRequest = getRequest(body, headers, "addHierarchy")
contentRequest.put("mode", "edit")
setRequestContext(contentRequest, version, objectType, schemaName)
getResult(ApiId.ADD_HIERARCHY_V4, collectionActor, contentRequest)
getResult(ApiId.ADD_HIERARCHY_V4, collectionActor, contentRequest, version = apiVersion)
}

def removeHierarchy() = Action.async { implicit request =>
Expand Down Expand Up @@ -251,7 +251,7 @@ class CollectionController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentAc
val contentRequest = getRequest(content, headers, "reviewContent")
setRequestContext(contentRequest, version, objectType, schemaName)
contentRequest.getContext.put("identifier", identifier);
getResult(ApiId.REVIEW_COLLECTION, contentActor, contentRequest)
getResult(ApiId.REVIEW_COLLECTION, contentActor, contentRequest, version = apiVersion)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ContentController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentActor:
else {
val contentRequest = getRequest(content, headers, "createContent", true)
setRequestContext(contentRequest, version, objectType, schemaName)
getResult(ApiId.CREATE_ASSET, contentActor, contentRequest, version = apiVersion)
getResult(ApiId.CREATE_CONTENT, contentActor, contentRequest, version = apiVersion)
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@ class ContentController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentActor:
content.putAll(Map("identifier" -> identifier).asJava)
val acceptRequest = getRequest(content, headers, "acceptFlag")
setRequestContext(acceptRequest, version, objectType, schemaName)
getResult(ApiId.ACCEPT_FLAG, contentActor, acceptRequest)
getResult(ApiId.ACCEPT_FLAG, contentActor, acceptRequest, version = apiVersion)
}


Expand All @@ -108,7 +108,7 @@ class ContentController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentActor:
content.putAll(Map("identifier" -> identifier).asJava)
val discardRequest = getRequest(content, headers, "discardContent")
setRequestContext(discardRequest, version, objectType, schemaName)
getResult(ApiId.DISCARD_CONTENT, contentActor, discardRequest)
getResult(ApiId.DISCARD_CONTENT, contentActor, discardRequest, version = apiVersion)
}
def retire(identifier: String) = Action.async { implicit request =>
val headers = commonHeaders()
Expand Down Expand Up @@ -192,7 +192,7 @@ class ContentController @Inject()(@Named(ActorNames.CONTENT_ACTOR) contentActor:
val contentRequest = getRequest(content, headers, "reviewContent")
setRequestContext(contentRequest, version, objectType, schemaName)
contentRequest.getContext.put("identifier", identifier);
getResult(ApiId.REVIEW_CONTENT, contentActor, contentRequest)
getResult(ApiId.REVIEW_CONTENT, contentActor, contentRequest, version = apiVersion)
}

def reviewReject(identifier: String) = Action.async { implicit request =>
Expand Down
Loading

0 comments on commit 8e2be12

Please sign in to comment.