mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	#122: fix error during redirect
This commit is contained in:
		@@ -5,10 +5,7 @@ import {updateUser} from 'components/user/actions';
 | 
			
		||||
 | 
			
		||||
const availableActions = {
 | 
			
		||||
    ...actions,
 | 
			
		||||
    updateUser,
 | 
			
		||||
    redirect(url) {
 | 
			
		||||
        location.href = url;
 | 
			
		||||
    }
 | 
			
		||||
    updateUser
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default new AuthFlow(availableActions);
 | 
			
		||||
 
 | 
			
		||||
@@ -53,6 +53,11 @@ export default class AuthFlow {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    run(actionId, payload) {
 | 
			
		||||
        if (actionId === 'redirect') {
 | 
			
		||||
            location.href = payload;
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.actions[actionId]) {
 | 
			
		||||
            throw new Error(`Action ${actionId} does not exists`);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user