redirect when promise is resolved