Admin page

This commit is contained in:
2026-10-29 21:42:26 -03:00
parent 07e61d9dd1
commit f7f34e1a57
18 changed files with 369 additions and 13 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ interface FormProps<T> {
on_error?: (message: string) => void;
class?: string;
method?: string;
headers?: Record<string, string>;
children: ComponentChildren;
}
@@ -28,7 +29,7 @@ export default function Form<T = unknown>(props: FormProps<T>) {
submitting.value = true;
error.value = "";
const result = await post_json<T>(props.action, body, props.method);
const result = await post_json<T>(props.action, body, props.method, props.headers);
submitting.value = false;
if (result.ok) props.on_success(result.data);