diff options
author | Grail Finder <wohilas@gmail.com> | 2024-12-10 17:55:10 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-12-10 17:55:10 +0300 |
commit | 5f780287aecedf08f94b6a1e0ae2a8822683a3fc (patch) | |
tree | 6de227e5f932bd5a2fa2cff3260ba23a68124e6d /storage | |
parent | 67f36d417fa97c4087e326623508370f60d3d3b8 (diff) |
Fix: display and upsert correct roles and icons
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/storage.go b/storage/storage.go index 9a1595c..b876dbc 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -56,8 +56,8 @@ func (p ProviderSQL) GetLastChatByAgent(agent string) (*models.Chat, error) { func (p ProviderSQL) UpsertChat(chat *models.Chat) (*models.Chat, error) { // Prepare the SQL statement query := ` - INSERT OR REPLACE INTO chats (id, name, msgs, created_at, updated_at) - VALUES (:id, :name, :msgs, :created_at, :updated_at) + INSERT OR REPLACE INTO chats (id, name, msgs, agent, created_at, updated_at) + VALUES (:id, :name, :msgs, :agent, :created_at, :updated_at) RETURNING *;` stmt, err := p.db.PrepareNamed(query) if err != nil { |