mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-14 07:03:09 +00:00
docs: add comments for all functions
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user