wisemapping-frontend/packages/webapp/src/utils.ts
Paulo Veiga c60254aca1 Add support for emoji
Update core libraries.
2022-10-31 05:17:01 +00:00

16 lines
399 B
TypeScript

export const getCsrfToken = (): string | null => {
const meta = document.head.querySelector('meta[name="_csrf"]');
if (!meta) {
return '';
}
return meta.getAttribute('content');
};
export const getCsrfTokenParameter = (): string => {
const meta = document.head.querySelector('meta[name="_csrf_parameter"]');
if (!meta) {
return '';
}
return meta.getAttribute('content');
};