Skip to content
Snippets Groups Projects

Polished auth flow including ReservedRoute and role selection.

Merged Defendi Alberto requested to merge feature/privateroute/role into dev
1 file
+ 1
2
Compare changes
  • Side-by-side
  • Inline
+ 1
2
import axios from 'axios';
/**
* Ask the server all the roles of an user (if the user has multiple roles).
* @returns array of roles.
* Set the role of the user in the database.
*/
export const setRole = async (role: string): Promise<void> =>
axios.post('/api/web/login/set_role', { role });
Loading