Trying this...
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m3s

This commit is contained in:
2026-01-16 17:24:50 -07:00
parent 15b903f1af
commit 5aa9388678
25 changed files with 4353 additions and 32 deletions

View File

@@ -12,6 +12,11 @@ export const POST: APIRoute = async ({ request, locals, redirect }) => {
const formData = await request.formData();
const organizationId = formData.get("organizationId") as string;
const name = formData.get("name") as string;
const street = formData.get("street") as string | null;
const city = formData.get("city") as string | null;
const state = formData.get("state") as string | null;
const zip = formData.get("zip") as string | null;
const country = formData.get("country") as string | null;
if (!organizationId || !name || name.trim().length === 0) {
return new Response("Organization ID and name are required", {
@@ -44,16 +49,23 @@ export const POST: APIRoute = async ({ request, locals, redirect }) => {
);
}
// Update organization name
// Update organization information
await db
.update(organizations)
.set({ name: name.trim() })
.set({
name: name.trim(),
street: street?.trim() || null,
city: city?.trim() || null,
state: state?.trim() || null,
zip: zip?.trim() || null,
country: country?.trim() || null,
})
.where(eq(organizations.id, organizationId))
.run();
return redirect("/dashboard/team/settings?success=org-name");
} catch (error) {
console.error("Error updating organization name:", error);
return new Response("Failed to update organization name", { status: 500 });
console.error("Error updating organization:", error);
return new Response("Failed to update organization", { status: 500 });
}
};