api: extract api test code to common_test.go

This commit is contained in:
Daniel Lee
2018-01-30 13:17:48 +01:00
parent 0fb05bcf59
commit a00a42d9ee
6 changed files with 109 additions and 157 deletions

View File

@@ -51,7 +51,6 @@ func GetDashboard(c *middleware.Context) Response {
guardian := guardian.NewDashboardGuardian(dash.Id, c.OrgId, c.SignedInUser)
if canView, err := guardian.CanView(); err != nil || !canView {
fmt.Printf("%v", err)
return dashboardGuardianResponse(err)
}