Commit 46a29697 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix sonarqube unecessary cast

parent 6232f84b
......@@ -30,10 +30,10 @@ export function reducer(state: State = initialState, action: actions.Actions): S
return {
...state,
attributeList
}
};
case actions.RETRIEVE_OBJECT_SUCCESS:
const object = action.payload as any;
const object = action.payload;
return {
...state,
......
......@@ -67,7 +67,7 @@ export class LoginEffects {
loginFailedAction$ = this.actions$.pipe(
ofType(loginActions.LOGIN_FAIL),
map((action: loginActions.LoginFailAction) => {
const anisServerError = action.payload as AnisServerError;
const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error);
})
);
......@@ -115,7 +115,7 @@ export class LoginEffects {
registerFailedAction$ = this.actions$.pipe(
ofType(loginActions.REGISTER_FAIL),
map((action: loginActions.RegisterFailAction) => {
const anisServerError = action.payload as AnisServerError;
const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error);
})
);
......@@ -147,7 +147,7 @@ export class LoginEffects {
forgotPasswordFailAction$ = this.actions$.pipe(
ofType(loginActions.FORGOT_PASSWORD_FAIL),
map((action: loginActions.ForgotPasswordFailAction) => {
const anisServerError = action.payload as AnisServerError;
const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error);
})
);
......@@ -182,7 +182,7 @@ export class LoginEffects {
changePasswordFailAction$ = this.actions$.pipe(
ofType(loginActions.CHANGE_PASSWORD_FAIL),
map((action: loginActions.ChangePasswordFailAction) => {
const anisServerError = action.payload as AnisServerError;
const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error);
})
);
......
......@@ -148,7 +148,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S
};
case actions.ADD_SELECTED_DATA:
const addData = action.payload as any;
const addData = action.payload;
return {
...state,
......@@ -156,7 +156,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S
};
case actions.DELETE_SELECTED_DATA:
const deleteData = action.payload as any;
const deleteData = action.payload;
return {
...state,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment