Chore: Remove Result from dashboard models (#61997)
* Chore: Remove Result from dashboard models * Fix lint tests * Fix dashboard service tests * Fix API tests * Remove commented out code * Chore: Merge main - cleanup
This commit is contained in:
@@ -30,18 +30,20 @@ func NewPermissionChecker(sqlStore db.DB, features featuremgmt.FeatureToggles,
|
||||
|
||||
func (c *PermissionChecker) getDashboardByUid(ctx context.Context, orgID int64, uid string) (*dashboards.Dashboard, error) {
|
||||
query := dashboards.GetDashboardQuery{UID: uid, OrgID: orgID}
|
||||
if err := c.dashboardService.GetDashboard(ctx, &query); err != nil {
|
||||
queryResult, err := c.dashboardService.GetDashboard(ctx, &query)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return query.Result, nil
|
||||
return queryResult, nil
|
||||
}
|
||||
|
||||
func (c *PermissionChecker) getDashboardById(ctx context.Context, orgID int64, id int64) (*dashboards.Dashboard, error) {
|
||||
query := dashboards.GetDashboardQuery{ID: id, OrgID: orgID}
|
||||
if err := c.dashboardService.GetDashboard(ctx, &query); err != nil {
|
||||
queryResult, err := c.dashboardService.GetDashboard(ctx, &query)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return query.Result, nil
|
||||
return queryResult, nil
|
||||
}
|
||||
|
||||
func (c *PermissionChecker) CheckReadPermissions(ctx context.Context, orgId int64, signedInUser *user.SignedInUser, objectType string, objectID string) (bool, error) {
|
||||
|
||||
Reference in New Issue
Block a user