Hi,
I am building an integration into an api. As a starting point I need to authorise the application.
Normally, following command from the controller works. return Redirect(url);
however, in my case I am executing an action from the jQuery action.
I have this snippet from the jQuery script, which is calling the controller correctly. text: app.localize('Authorise'), visible: function () { return entityHistoryIsEnabled(); }, action: function (data) { abp.ajax({ url: '/App/Integrations/Register', data: JSON.stringify({ id: data.record.Integration.id }), }); }
However, the ABP is expecting a JSON response and redirect fails.
If I move the controller code to Index(), it works fine.
Any advice on what command to use to redirect from tje jQuery script?
I can return the URL as JSON back to the script and redirect from there.
Reference: https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX
Many thanks.
Regards, Vikas