fix(web): fix behavior on getting no quotes

This commit is contained in:
2025-01-07 03:23:48 +03:00
parent 838f089c69
commit b3090f5dc0
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -121,6 +121,7 @@ func QuotesGet(ctx context.Context, user_id string, filter string, sort string,
err = fmt.Errorf("error while getting quotes: %w", err)
return
}
quotes = []models.Quote{}
for rows.Next() {
var quote models.Quote
err = rows.Scan(&quote.ID, &quote.Text, &quote.Author, &quote.Datetime, &quote.Creator.ID, &quote.Creator.Name, &quote.Creator.Login, &quote.Creator.Role, &quote.Creator.TelegramID)