Chore: Remove context.TODO() from services (#42555)

* Remove context.TODO() from services

* Fix live test
This commit is contained in:
idafurjes
2021-12-20 17:05:33 +01:00
committed by GitHub
parent 6f8e651cdb
commit ff3cf94b56
23 changed files with 78 additions and 75 deletions
+2 -2
View File
@@ -129,7 +129,7 @@ func (dr *dashboardServiceImpl) buildSaveDashboardCommand(ctx context.Context, d
}
if isParentFolderChanged {
folderGuardian := guardian.New(context.TODO(), dash.FolderId, dto.OrgId, dto.User)
folderGuardian := guardian.New(ctx, dash.FolderId, dto.OrgId, dto.User)
if canSave, err := folderGuardian.CanSave(); err != nil || !canSave {
if err != nil {
return nil, err
@@ -149,7 +149,7 @@ func (dr *dashboardServiceImpl) buildSaveDashboardCommand(ctx context.Context, d
}
}
guard := guardian.New(context.TODO(), dash.GetDashboardIdForSavePermissionCheck(), dto.OrgId, dto.User)
guard := guardian.New(ctx, dash.GetDashboardIdForSavePermissionCheck(), dto.OrgId, dto.User)
if canSave, err := guard.CanSave(); err != nil || !canSave {
if err != nil {
return nil, err