sensorDigital, grafik Fest, drawPunkt eingefügt
This commit is contained in:
1 parent
0de185c014
commit
30ad6d0e47
106 files changed
+1371
-317
No files matched your search
@@ -13,7 +13,7 @@ async function request<T>(path: string, method: string, data?: unknown): Promise
|
||||
});
|
||||
const result = await response.json();
|
||||
if (!response.ok) return { success: false, errors: Array.isArray(result.message) ? result.message : [result.message ?? 'Aktion fehlgeschlagen'] };
|
||||
if (method !== 'GET') revalidatePath('/rk2/units/templates');
|
||||
if (method !== 'GET') revalidatePath('/units/templates');
|
||||
return { success: true, data: result };
|
||||
} catch {
|
||||
return { success: false, errors: ['Keine Verbindung zum Backend. Bitte vor erneutem Speichern oder Einfügen die Liste prüfen.'] };
|
||||
@@ -30,10 +30,10 @@ export async function api_templates_delete(id: string) { return request<{ succes
|
||||
export async function api_templates_insert(id: string, data: UnitCopy) {
|
||||
const result = await request<UnitResponse>(`/${encodeURIComponent(id)}/instantiate`, 'POST', data);
|
||||
if (result.success) {
|
||||
revalidatePath('/rk2/units');
|
||||
revalidatePath('/rk2/signals');
|
||||
revalidatePath('/rk2/signals/assignment');
|
||||
revalidatePath('/rk2/signals/assignments');
|
||||
revalidatePath('/units');
|
||||
revalidatePath('/signals');
|
||||
revalidatePath('/signals/assignment');
|
||||
revalidatePath('/signals/assignments');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user