Switch to prefixed IDs and tell agents which Mac a message came from
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"g.fc.run/ai/byre/internal/api"
|
||||
"g.fc.run/ai/byre/internal/ids"
|
||||
)
|
||||
|
||||
func (s *Store) LeadNotes(ctx context.Context, owner string) ([]api.LeadNote, error) {
|
||||
@@ -51,7 +52,7 @@ func (s *Store) SaveLeadNote(ctx context.Context, owner, id, projectID, text, ac
|
||||
}
|
||||
err := s.write(ctx, func(tx *sql.Tx, emit emitFunc) error {
|
||||
if id == "" {
|
||||
n.Id = NewID()
|
||||
n.Id = ids.New(ids.LeadNote)
|
||||
_, err := tx.ExecContext(ctx, `INSERT INTO lead_notes (id, owner, text, project_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)`,
|
||||
n.Id, owner, text, projectID, formatTime(at), formatTime(at))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user