mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
making changes suggested in review and improving typings
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
// Libaries
|
||||
import { ThunkAction } from 'redux-thunk';
|
||||
|
||||
// Services & Utils
|
||||
import { getBackendSrv } from 'app/core/services/backend_srv';
|
||||
import { actionCreatorFactory, noPayloadActionCreatorFactory } from 'app/core/redux';
|
||||
@@ -11,7 +8,7 @@ import { loadPluginDashboards } from '../../plugins/state/actions';
|
||||
import { notifyApp } from 'app/core/actions';
|
||||
|
||||
// Types
|
||||
import { StoreState } from 'app/types';
|
||||
import { ThunkResult } from 'app/types';
|
||||
import {
|
||||
DashboardAcl,
|
||||
DashboardAclDTO,
|
||||
@@ -26,8 +23,6 @@ export const setDashboardLoadingState = actionCreatorFactory<DashboardLoadingSta
|
||||
export const setDashboardModel = actionCreatorFactory<MutableDashboard>('SET_DASHBOARD_MODEL').create();
|
||||
export const setDashboardLoadingSlow = noPayloadActionCreatorFactory('SET_DASHBOARD_LOADING_SLOW').create();
|
||||
|
||||
export type ThunkResult<R> = ThunkAction<R, StoreState, undefined, any>;
|
||||
|
||||
export function getDashboardPermissions(id: number): ThunkResult<void> {
|
||||
return async dispatch => {
|
||||
const permissions = await getBackendSrv().get(`/api/dashboards/id/${id}/permissions`);
|
||||
|
||||
Reference in New Issue
Block a user