feat: implement user profile management with avatars, login, and personal data
- Add avatar upload functionality with public URL access. - Implement user login with email and password authentication. - Create endpoints for fetching and updating the authenticated user's profile. - Set up database migrations for user profiles, including email and role management. - Introduce personal data management linked to user profiles. - Add email verification process with welcome email templates.
This commit is contained in:
24
admin/system.go
Normal file
24
admin/system.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
authsvc "encore.app/auth"
|
||||
profilessvc "encore.app/profiles"
|
||||
)
|
||||
|
||||
type SystemOptionsResponse struct {
|
||||
Roles []authsvc.RoleOption `json:"roles"`
|
||||
Statuses []profilessvc.StatusOption `json:"statuses"`
|
||||
}
|
||||
|
||||
// GetSystemOptions returns the valid roles and profile statuses, each with a
|
||||
// display name and underlying value, for use in admin UI dropdowns.
|
||||
//
|
||||
//encore:api auth method=GET path=/admin/system/options
|
||||
func GetSystemOptions(ctx context.Context) (*SystemOptionsResponse, error) {
|
||||
return &SystemOptionsResponse{
|
||||
Roles: authsvc.Roles(),
|
||||
Statuses: profilessvc.Statuses(),
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user