[management] Get account id with order (#3773)

updated log to display account id
This commit is contained in:
Maycon Santos
2025-05-02 00:25:46 +02:00
committed by GitHub
parent 01c3719c5d
commit 2abb92b0d4
2 changed files with 2 additions and 2 deletions

View File

@@ -802,7 +802,7 @@ func (s *SqlStore) GetAccountByPeerPubKey(ctx context.Context, peerKey string) (
func (s *SqlStore) GetAnyAccountID(ctx context.Context) (string, error) {
var account types.Account
result := s.db.WithContext(ctx).Select("id").Limit(1).Find(&account)
result := s.db.WithContext(ctx).Select("id").Order("created_at desc").Limit(1).Find(&account)
if result.Error != nil {
return "", status.NewGetAccountFromStoreError(result.Error)
}