mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 22:15:45 +01:00
correct reloading of index resources after logn/logout
This commit is contained in:
@@ -5,7 +5,7 @@ import * as types from "./types";
|
||||
import { apiClient, UNAUTHORIZED_ERROR } from "@scm-manager/ui-components";
|
||||
import { isPending } from "./pending";
|
||||
import { getFailure } from "./failure";
|
||||
import { callFetchIndexResources } from "./indexResource";
|
||||
import { callFetchIndexResources, fetchIndexResources } from "./indexResource";
|
||||
|
||||
// Action
|
||||
|
||||
@@ -160,6 +160,9 @@ export const login = (
|
||||
.then(me => {
|
||||
dispatch(loginSuccess(me));
|
||||
})
|
||||
.then(() => {
|
||||
dispatch(fetchIndexResources());
|
||||
})
|
||||
.catch(err => {
|
||||
dispatch(loginFailure(err));
|
||||
});
|
||||
@@ -191,6 +194,9 @@ export const logout = (link: string) => {
|
||||
.then(() => {
|
||||
dispatch(logoutSuccess());
|
||||
})
|
||||
.then(() => {
|
||||
dispatch(fetchIndexResources());
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch(logoutFailure(error));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user