This repository has been archived by the owner on Sep 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1612 from 18F/wml-clear-yes-no
Clear Yes Nos Part 1: Integrations testing in their own database
- Loading branch information
Showing
90 changed files
with
1,824 additions
and
1,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package admin | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
|
||
"github.com/18F/e-QIP-prototype/api" | ||
) | ||
|
||
// Rejector is used to reject/kickback an application | ||
type Rejector struct { | ||
DB api.DatabaseService | ||
PDF api.PdfService | ||
} | ||
|
||
// Reject rejects the application for a given account | ||
func (r Rejector) Reject(account api.Account) error { | ||
err := account.Unlock(r.DB) | ||
if err != nil { | ||
return errors.Wrap(err, "Reject failed to unlock account") | ||
} | ||
|
||
// TODO: port over PDF.RemovePdfs. | ||
// err = r.PDF.RemovePdfs(account) | ||
// if err != nil { | ||
// return errors.Wrap(err, "Reject failed to remove PDFs") | ||
// } | ||
|
||
err = account.ClearNoBranches(r.DB) | ||
if err != nil { | ||
return errors.Wrap(err, "Reject failed to clear the no branches") | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.