Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 10:35:50 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 10:35:50 +0300
commit6ced549deaecb42b9bb93ea9efcb4c1bbaabe8a4 (patch)
tree28d8d82530476cf607e4d05ca189ae05868711e6 /web/service/user.go
parentf60682a6b7cb749fee403c84e2587c3ad7e7ced0 (diff)
docs: add comments for all functions
Diffstat (limited to 'web/service/user.go')
-rw-r--r--web/service/user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/service/user.go b/web/service/user.go
index 074eb7ef..f42c3cf8 100644
--- a/web/service/user.go
+++ b/web/service/user.go
@@ -12,10 +12,14 @@ import (
"gorm.io/gorm"
)
+// UserService provides business logic for user management and authentication.
+// It handles user creation, login, password management, and 2FA operations.
type UserService struct {
settingService SettingService
}
+// GetFirstUser retrieves the first user from the database.
+// This is typically used for initial setup or when there's only one admin user.
func (s *UserService) GetFirstUser() (*model.User, error) {
db := database.GetDB()