mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:16:47 +00:00
Change arguments of connector function views to take a more reasonable parameter of a BankAccount instead of just an id
This commit is contained in:
parent
d93accc7a2
commit
7e7e854608
@ -277,7 +277,7 @@ class BankAccount(
|
||||
//check if the user have access to the owner view in this the account
|
||||
if(user.ownerAccess(this))
|
||||
for{
|
||||
isRevoked <- LocalStorage.views(id) ?~ "could not get the views"
|
||||
isRevoked <- LocalStorage.views(this) ?~ "could not get the views"
|
||||
} yield isRevoked
|
||||
else
|
||||
Failure("user : " + user.emailAddress + " don't have access to owner view on account " + id, Empty, Empty)
|
||||
|
||||
@ -85,7 +85,7 @@ trait LocalStorage extends Loggable {
|
||||
|
||||
def createView(bankAccount : BankAccount, view: ViewCreationJSON) : Box[View]
|
||||
def removeView(viewId: String, bankAccount: BankAccount): Box[Unit]
|
||||
def views(bankAccountID : String) : Box[List[View]]
|
||||
def views(bankAccount : BankAccount) : Box[List[View]]
|
||||
def permittedViews(user: User, bankAccount: BankAccount): List[View]
|
||||
def publicViews(bankAccount : BankAccount) : Box[List[View]]
|
||||
|
||||
@ -788,8 +788,8 @@ class MongoDBLocalStorage extends LocalStorage {
|
||||
} yield {}
|
||||
}
|
||||
|
||||
def views(bankAccountID : String) : Box[List[View]] = {
|
||||
for(account <- HostedAccount.find(By(HostedAccount.accountID,bankAccountID)))
|
||||
def views(bankAccount : BankAccount) : Box[List[View]] = {
|
||||
for(account <- HostedAccount.find(By(HostedAccount.accountID, bankAccount.id)))
|
||||
yield {
|
||||
account.views.toList
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user