Skip to content

Commit

Permalink
#17 se realiza el refactor marcado por el TODO del metodo para autori…
Browse files Browse the repository at this point in the history
…zar el deposito
  • Loading branch information
says33 committed May 3, 2016
1 parent 69638a6 commit 1a0ca3c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions grails-app/controllers/com/cte/DepositOrderController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ class DepositOrderController {

static allowedMethods = [save: "POST", update: "PUT", delete: "DELETE"]

// TODO: Refactor
def authorizeDepositOrder(DepositOrder order) {
def user = springSecurityService.currentUser
depositOrderService.addAuthorizationToDepositOrder(order, user)
if (depositOrderService.isFullAuthorized(order)){
order.status = DepositOrderStatus.AUTHORIZED
order.save flush:true
depositOrderService.notifyAuthorizationDepositOrder(order)
}

if (depositOrderService.isFullAuthorized(order))
depositOrderService.authorizeAndNotifyDepositOrder(order)
redirect action:"list", params:[status: params.status]

}
Expand Down

0 comments on commit 1a0ca3c

Please sign in to comment.