From 79cd1c1cc52d37c50d69f1dfe35af8e1ac8f69d7 Mon Sep 17 00:00:00 2001 From: blint <rethelyibalint@gmail.com> Date: Sun, 20 Aug 2023 20:53:45 +0200 Subject: [PATCH] Fix sorting issue in user retrieval function Modified the 'GetUsers()' function call in 'topup.go' to use 'GetUsersSorted()' instead. The change is expected to return users in a sorted manner which will significantly improve the feature that relies on the user list. Prior to this, the absence of sorting resulted in inefficient retrieval and handling of user list. Detailed error handling for potential issues during retrieval is yet to be implemented and is planned for future updates. --- topup/topup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topup/topup.go b/topup/topup.go index ae0ff64..2fbf1a8 100644 --- a/topup/topup.go +++ b/topup/topup.go @@ -40,7 +40,7 @@ func topupHandler(w http.ResponseWriter, r *http.Request) { return } - users, err := db.GetUsers() + users, err := db.GetUsersSorted(db.GetDB()) if err != nil { // TODO: error handling!!! } -- GitLab