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);