feat: redesign landing page UI and improve header

This commit is contained in:
tinkle-community
2025-12-09 13:59:14 +08:00
parent 4291b80273
commit 48792907b3
12 changed files with 1204 additions and 738 deletions

View File

@@ -197,8 +197,12 @@ func (s *TraderStore) UpdateCustomPrompt(userID, id string, customPrompt string,
return err
}
// Delete deletes trader
// Delete deletes trader and associated data
func (s *TraderStore) Delete(userID, id string) error {
// Delete associated equity snapshots first
_, _ = s.db.Exec(`DELETE FROM trader_equity_snapshots WHERE trader_id = ?`, id)
// Delete the trader
_, err := s.db.Exec(`DELETE FROM traders WHERE id = ? AND user_id = ?`, id, userID)
return err
}