mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 20:27:15 +00:00
Tweaked a function name
This commit is contained in:
parent
509c0c5f23
commit
e6ea0077e9
@ -645,7 +645,7 @@ object APIUtil extends MdcLoggable {
|
||||
JsonResponse(jsonAst, getHeaders() ::: headers.list, Nil, httpCode)
|
||||
}
|
||||
|
||||
def successJsonResponseFromCaseClass(cc: Any, callContext: Option[CallContext], httpCode : Int = 200)(implicit headers: CustomResponseHeaders = CustomResponseHeaders(Nil)) : JsonResponse = {
|
||||
def successJsonResponseNewStyle(cc: Any, callContext: Option[CallContext], httpCode : Int = 200)(implicit headers: CustomResponseHeaders = CustomResponseHeaders(Nil)) : JsonResponse = {
|
||||
val jsonAst = ApiSession.processJson(snakify(Extraction.decompose(cc)), callContext)
|
||||
logAPICall(callContext.map(_.copy(endTime = Some(Helpers.now))))
|
||||
callContext match {
|
||||
@ -1830,7 +1830,7 @@ Versions are groups of endpoints in a file
|
||||
*/
|
||||
def futureToResponse[T](in: LAFuture[(T, Option[CallContext])]): JsonResponse = {
|
||||
RestContinuation.async(reply => {
|
||||
in.onSuccess(t => reply.apply(successJsonResponseFromCaseClass(cc = t._1, t._2)(getGatewayLoginHeader(t._2))))
|
||||
in.onSuccess(t => reply.apply(successJsonResponseNewStyle(cc = t._1, t._2)(getGatewayLoginHeader(t._2))))
|
||||
in.onFail {
|
||||
case Failure(msg, _, _) => reply.apply(errorJsonResponse(msg))
|
||||
case _ => reply.apply(errorJsonResponse("Error"))
|
||||
@ -1859,7 +1859,7 @@ Versions are groups of endpoints in a file
|
||||
*/
|
||||
def futureToBoxedResponse[T](in: LAFuture[(T, Option[CallContext])]): Box[JsonResponse] = {
|
||||
RestContinuation.async(reply => {
|
||||
in.onSuccess(t => Full(reply.apply(successJsonResponseFromCaseClass(t._1, t._2)(getGatewayLoginHeader(t._2)))))
|
||||
in.onSuccess(t => Full(reply.apply(successJsonResponseNewStyle(t._1, t._2)(getGatewayLoginHeader(t._2)))))
|
||||
in.onFail {
|
||||
case Failure(msg, _, _) => Full(reply.apply(errorJsonResponse(msg)))
|
||||
case _ => Full(reply.apply(errorJsonResponse("Error")))
|
||||
|
||||
@ -716,7 +716,7 @@ trait APIMethods300 {
|
||||
ai: InboundAdapterInfoInternal <- Connector.connector.vend.getAdapterInfo() ?~ "Not implemented"
|
||||
}
|
||||
yield {
|
||||
successJsonResponseFromCaseClass(createAdapterInfoJson(ai), None)
|
||||
successJsonResponseNewStyle(createAdapterInfoJson(ai), None)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user