mirror of
https://github.com/kerberos-io/agent.git
synced 2026-10-19 17:38:25 +00:00
Eslint: Fix Unexpected unnamed function func-names
This is the proper and correct new way of using anonymous functions. Reference: https://stackoverflow.com/questions/52735032/warning-unexpected-unnamed-function-func-names-under-eslint-rule
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
} from '../api/agent';
|
||||
|
||||
export const verifyPersistence = (config, onSuccess, onError) => {
|
||||
return function (dispatch) {
|
||||
return (dispatch) => {
|
||||
doVerifyPersistence(
|
||||
config,
|
||||
() => {
|
||||
@@ -29,7 +29,7 @@ export const verifyPersistence = (config, onSuccess, onError) => {
|
||||
};
|
||||
|
||||
export const verifyHub = (config, onSuccess, onError) => {
|
||||
return function (dispatch) {
|
||||
return (dispatch) => {
|
||||
doVerifyHub(
|
||||
config,
|
||||
() => {
|
||||
@@ -51,7 +51,7 @@ export const verifyHub = (config, onSuccess, onError) => {
|
||||
};
|
||||
|
||||
export const getKerberosAgentTags = (onSuccess, onError) => {
|
||||
return function (dispatch) {
|
||||
return (dispatch) => {
|
||||
doGetKerberosAgentTags(
|
||||
(data) => {
|
||||
dispatch({
|
||||
@@ -72,7 +72,7 @@ export const getKerberosAgentTags = (onSuccess, onError) => {
|
||||
};
|
||||
|
||||
export const getConfig = (service, onSuccess, onError) => {
|
||||
return function (dispatch) {
|
||||
return (dispatch) => {
|
||||
doGetConfig(
|
||||
service,
|
||||
(data) => {
|
||||
@@ -94,7 +94,7 @@ export const getConfig = (service, onSuccess, onError) => {
|
||||
};
|
||||
|
||||
export const saveConfig = (service, config, onSuccess, onError) => {
|
||||
return function (dispatch) {
|
||||
return (dispatch) => {
|
||||
doSaveConfig(
|
||||
service,
|
||||
config,
|
||||
|
||||
+10
-10
@@ -9,10 +9,10 @@ export function doGetConfig(onSuccess, onError) {
|
||||
}
|
||||
return res.data;
|
||||
})
|
||||
.then(function (data) {
|
||||
.then((data) => {
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error) => {
|
||||
onError(error);
|
||||
});
|
||||
}
|
||||
@@ -28,10 +28,10 @@ export function doSaveConfig(config, onSuccess, onError) {
|
||||
}
|
||||
return res.data;
|
||||
})
|
||||
.then(function (data) {
|
||||
.then((data) => {
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error) => {
|
||||
onError(error);
|
||||
});
|
||||
}
|
||||
@@ -45,10 +45,10 @@ export function doGetKerberosAgentTags(onSuccess, onError) {
|
||||
}
|
||||
return res.data;
|
||||
})
|
||||
.then(function (data) {
|
||||
.then((data) => {
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error) => {
|
||||
onError(error);
|
||||
});
|
||||
}
|
||||
@@ -64,10 +64,10 @@ export function doVerifyPersistence(config, onSuccess, onError) {
|
||||
}
|
||||
return res.data;
|
||||
})
|
||||
.then(function (data) {
|
||||
.then((data) => {
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error) => {
|
||||
onError(error);
|
||||
});
|
||||
}
|
||||
@@ -83,10 +83,10 @@ export function doVerifyHub(config, onSuccess, onError) {
|
||||
}
|
||||
return res.data;
|
||||
})
|
||||
.then(function (data) {
|
||||
.then((data) => {
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error) => {
|
||||
onError(error);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user