dashboards: cleanup

Move api calls to backend_srv
This commit is contained in:
Marcus Efraimsson
2018-02-21 16:56:34 +01:00
parent b7cf6f9781
commit 20ebb614f6
3 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ export class LoadDashboardCtrl {
// if no uid, redirect to new route based on slug
if (!($routeParams.type === 'script' || $routeParams.type === 'snapshot') && !$routeParams.uid) {
backendSrv.get(`/api/dashboards/db/${$routeParams.slug}`).then(res => {
backendSrv.getDashboardBySlug($routeParams.slug).then(res => {
if (res) {
$location.path(locationUtil.stripBaseFromUrl(res.meta.url)).replace();
}