Skip to content
Snippets Groups Projects
Verified Commit 4b426dd6 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Get roles from server.

parent 482ad896
No related branches found
No related tags found
2 merge requests!56Refined auth flow and new website pages.,!45Polished auth flow including ReservedRoute and role selection.
import axios from 'axios';
/**
* Ask the server all the roles of an user if the user has multiple roles.
* @returns array of roles.
*/
export const getRoles = async (): Promise<string[]> =>
axios('/api/web/login/get_roles').then((res) => res.data.roles);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment