LibraryPanels: Refactor to use context.Context instead of models.ReqContext (#39561)

This commit is contained in:
Agnès Toulet
2021-09-27 09:04:36 +02:00
committed by GitHub
parent 1d1da09568
commit 57b20335e6
12 changed files with 157 additions and 163 deletions

View File

@ -224,12 +224,12 @@ func (hs *HTTPServer) ImportDashboard(c *models.ReqContext, apiCmd dtos.ImportDa
return hs.dashboardSaveErrorToApiResponse(err)
}
err = hs.LibraryPanelService.ImportLibraryPanelsForDashboard(c, dash, apiCmd.FolderId)
err = hs.LibraryPanelService.ImportLibraryPanelsForDashboard(c.Req.Context(), c.SignedInUser, dash, apiCmd.FolderId)
if err != nil {
return response.Error(500, "Error while importing library panels", err)
}
err = hs.LibraryPanelService.ConnectLibraryPanelsForDashboard(c, dash)
err = hs.LibraryPanelService.ConnectLibraryPanelsForDashboard(c.Req.Context(), c.SignedInUser, dash)
if err != nil {
return response.Error(500, "Error while connecting library panels", err)
}