commit 3b102b5382b8a4b7b86c9db6cf140724e6085ac5
parent 48a4ad8bb7f1c1a3d29add0082d3657528cce2fd
Author: MS <ms@taler.net>
Date: Thu, 25 Jun 2020 05:34:53 +0200
following documentation
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/JSON.kt
@@ -330,6 +330,6 @@ data class CreateAccountTaskRequest(
)
data class ImportBankAccount(
- val accountId: String,
- val localName: String
+ val offeredAccountId: String,
+ val nexusBankAccountId: String
)
\ No newline at end of file
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -808,14 +808,14 @@ fun serverMain(dbName: String, host: String) {
call.respond(ret)
}
// import one account into libeufin.
- post("/accounts/import") {
+ post("/import-account") {
val body = call.receive<ImportBankAccount>()
transaction {
val conn = requireBankConnection(call, "connid")
- val account = OfferedBankAccountEntity.findById(body.accountId) ?: throw NexusError(
- HttpStatusCode.NotFound, "Could not found raw bank account '${body.accountId}'"
+ val account = OfferedBankAccountEntity.findById(body.offeredAccountId) ?: throw NexusError(
+ HttpStatusCode.NotFound, "Could not found raw bank account '${body.offeredAccountId}'"
)
- val importedBankAccount = NexusBankAccountEntity.new(body.localName) {
+ val importedBankAccount = NexusBankAccountEntity.new(body.nexusBankAccountId) {
iban = account.iban
bankCode = account.bankCode
defaultBankConnection = conn