Zammad send fixes, update deps

This commit is contained in:
Darren Clarke 2024-08-14 10:51:12 +02:00
parent c47223f5e9
commit a4053e6412
29 changed files with 626 additions and 500 deletions

View file

@ -3,14 +3,19 @@
import { executeREST } from "app/_lib/zammad";
export const getGroupsAction = async () => {
const groups = await executeREST({
path: "/api/v1/groups",
});
const allGroups = groups ?? [];
const formattedGroups = allGroups.map((group: any) => ({
label: group.name,
value: `gid://zammad/Group/${group.id}`,
}));
try {
const groups = await executeREST({
path: "/api/v1/groups",
});
const allGroups = groups ?? [];
const formattedGroups = allGroups.map((group: any) => ({
label: group.name,
value: `gid://zammad/Group/${group.id}`,
}));
return formattedGroups;
return formattedGroups;
} catch (e) {
console.error(e);
return [];
}
};