-
Defendi Alberto authoredDefendi Alberto authored
getRole.ts 302 B
import axios from 'axios';
/**
* @async
* Asks for the current set role.
* @returns {string} empty if the role is not set or a name between those defined
* in {@see userRoles}
*/
export const getRole = async (): Promise<string> =>
axios('/api/web/login/get_role').then((res) => res.data.role);