core: fix project icon update to preserve existing icon properties
Some checks failed
deploy / deploy (push) Waiting to run
test / test (push) Waiting to run
Update Nix Hashes / update (push) Waiting to run
format / format (push) Has been cancelled
sdk / format (push) Has been cancelled
snapshot / publish (push) Has been cancelled

This commit is contained in:
Dax Raad 2025-12-09 15:10:53 -05:00
parent 2ad99713f3
commit 7439a40b00

View file

@ -22,8 +22,8 @@ export namespace Project {
name: z.string().optional(),
icon: z
.object({
url: z.string(),
color: z.string(),
url: z.string().optional(),
color: z.string().optional(),
})
.optional(),
time: z.object({
@ -135,8 +135,8 @@ export namespace Project {
const url = `data:${mime};base64,${base64}`
await Storage.update<Info>(["project", input.id], (draft) => {
draft.icon = {
...draft.icon,
url,
color: draft.icon?.color ?? "#000000",
}
})
return