From 6ced549deaecb42b9bb93ea9efcb4c1bbaabe8a4 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Sat, 20 Sep 2025 09:35:50 +0200 Subject: docs: add comments for all functions --- web/service/user.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/service/user.go') 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() -- cgit v1.2.3