Skip to content
Snippets Groups Projects
Unverified Commit 79cd1c1c authored by Réthelyi Bálint's avatar Réthelyi Bálint :no_mouth:
Browse files

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.
parent 5feb8a29
No related branches found
No related tags found
1 merge request!25Add API endpoints and middleware for user and product manipulation
......@@ -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!!!
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment