| 415 | } |
| 416 | |
| 417 | func SetIcon(workspaceId string, icon string) error { |
| 418 | ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) |
| 419 | defer cancel() |
| 420 | ws, e := wstore.DBGet[*waveobj.Workspace](ctx, workspaceId) |
| 421 | if e != nil { |
| 422 | return e |
| 423 | } |
| 424 | if ws == nil { |
| 425 | return fmt.Errorf("workspace not found: %q", workspaceId) |
| 426 | } |
| 427 | ws.Icon = icon |
| 428 | wstore.DBUpdate(ctx, ws) |
| 429 | return nil |
| 430 | } |
| 431 | |
| 432 | func SetColor(workspaceId string, color string) error { |
| 433 | ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) |