feat: move org name and logo to db

This commit is contained in:
2026-05-30 14:31:01 +00:00
parent fc5699a04c
commit 6012566b22
7 changed files with 294 additions and 7 deletions
+8
View File
@@ -399,6 +399,14 @@ export const api = {
);
return d.items;
},
async settings() {
return handle<{ org_name: string; org_logo: string }>(await fetchApi("/api/v2/settings"));
},
async updateSettings(body: { org_name: string; org_logo: string }) {
return handle<{ org_name: string; org_logo: string; org?: { name: string; logo: string } }>(
await fetchApi("/api/v2/settings", { method: "PUT", headers: jsonHeaders, body: JSON.stringify(body) }),
);
},
async customFields(entityType: string) {
const d = await handle<{ items: CustomFieldDef[] }>(await fetchApi(`/api/v2/custom_fields/${entityType}`));
return d.items;