add table

This commit is contained in:
Pascal Fischer
2024-04-26 17:45:10 +02:00
parent 480192028e
commit 4a147006d2

View File

@@ -559,7 +559,7 @@ func (s *SqliteStore) GetAccountIDByPeerPubKey(peerKey string) (string, error) {
}()
var accountID string
result := s.db.Select("account_id").Where("key = ?", peerKey).First(&accountID)
result := s.db.Select("account_id").Table("peers").Where("key = ?", peerKey).First(&accountID)
if result.Error != nil {
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
return "", status.Errorf(status.NotFound, "account not found: index lookup failed")