-
Defendi Alberto authoredDefendi Alberto authored
getRoles.ts 282 B
import axios from 'axios';
/**
* @async
* Ask the server all the roles of an user if the user has multiple roles.
* @returns {string[]} array of roles.
*/
export const getRoles = async (): Promise<string[]> =>
axios('/api/web/login/get_roles').then((res) => res.data.roles);