keycloak-scim/src/groups/groupIdUtils.ts
Erik Jan de Wit e4d83d0fe3
Group details (#425)
* added details for groups

* add includeSubGroups checkbox

* added tests

* fixed reload for group attributes

* fixed spacing on associate roles tab

* fixed group reload after save

* fixed test
2021-03-16 08:37:57 -04:00

9 lines
320 B
TypeScript

export const getId = (pathname: string) => {
const pathParts = pathname.substr(1).split("/");
return pathParts.length > 1 ? pathParts.splice(2) : undefined;
};
export const getLastId = (pathname: string) => {
const pathParts = getId(pathname);
return pathParts ? pathParts[pathParts.length - 1] : undefined;
};