Skip to content

Commit

Permalink
add to
Browse files Browse the repository at this point in the history
  • Loading branch information
deinelieblings committed Nov 7, 2018
1 parent 6313b8e commit e79da13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/daos/OauthClientDao.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ trait OauthClientDao {
def validate(id: String, secret: Option[String], grantType: String) : Future[Boolean]
def update(client: OauthClient) : Future[OauthClient]
def delete(client: OauthClient) : Future[Boolean]
def list_with_statement(statement : SQLActionBuilder) : Future[List[OauthClient]]

}

class MongoOauthClientDao extends OauthClientDao {
Expand Down Expand Up @@ -70,6 +72,7 @@ class MongoOauthClientDao extends OauthClientDao {
// It's necessary to define functions for the OauthClientDao trait in MongoOauthClientDao
def update(client: OauthClient): Future[OauthClient] = ???
def delete(client: OauthClient) : Future[Boolean] = ???
def list_with_statement(statement : SQLActionBuilder) : Future[List[OauthClient]] = ???
}

class MariadbOauthClientDao extends OauthClientDao {
Expand Down
2 changes: 1 addition & 1 deletion app/services/OAuthService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class OauthClientService @Inject() (oauthClientDao: OauthClientDao) {
def get(id: String, secret: String): Future[Option[OauthClient]] = oauthClientDao.find(id, secret)
def get(id: String, secret: Option[String], grandType: String): Future[Option[OauthClient]] = oauthClientDao.find(id, secret, grandType)
def delete(client: OauthClient): Future[Boolean] = oauthClientDao.delete(client)
def list_with_statement(statement: SQLActionBuilder): Future[List[OauthClient]] = ???
def list_with_statement(statement: SQLActionBuilder): Future[List[OauthClient]] = oauthClientDao.list_with_statement(statement)
}

0 comments on commit e79da13

Please sign in to comment.