Refactoring of routes

group functionalities working
This commit is contained in:
2025-06-29 06:58:23 +00:00
parent 55ae392411
commit 6639006d65
8 changed files with 234 additions and 178 deletions

View File

@@ -16,12 +16,12 @@ export async function fetchGroups() {
export async function deleteGroup(groupName: string) {
// Passe ggf. an deine API an
return fetch(`/api/groups/${encodeURIComponent(groupName)}`, { method: 'DELETE' });
return fetch(`/api/groups/byname/${encodeURIComponent(groupName)}`, { method: 'DELETE' });
}
export async function renameGroup(oldName: string, newName: string) {
// Passe ggf. an deine API an
return fetch(`/api/groups/${encodeURIComponent(oldName)}`, {
return fetch(`/api/groups/byname/${encodeURIComponent(oldName)}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ newName }),

View File

@@ -8,7 +8,7 @@ const Dashboard: React.FC = () => {
useEffect(() => {
fetchClients().then(setClients).catch(console.error);
}, []);
return (
<div>
<header className="mb-8 pb-4 border-b-2 border-[#d6c3a6]">