add checkbox styling, driverslicence handling and validation
This commit is contained in:
@@ -17,11 +17,12 @@ import (
|
||||
)
|
||||
|
||||
type UserController struct {
|
||||
Service services.UserServiceInterface
|
||||
EmailService *services.EmailService
|
||||
ConsentService services.ConsentServiceInterface
|
||||
BankAccountService services.BankAccountServiceInterface
|
||||
MembershipService services.MembershipServiceInterface
|
||||
Service services.UserServiceInterface
|
||||
EmailService *services.EmailService
|
||||
ConsentService services.ConsentServiceInterface
|
||||
BankAccountService services.BankAccountServiceInterface
|
||||
MembershipService services.MembershipServiceInterface
|
||||
DriversLicenceService services.DriversLicenceInterface
|
||||
}
|
||||
|
||||
type RegistrationData struct {
|
||||
@@ -129,10 +130,17 @@ func (uc *UserController) CurrentUserHandler(c *gin.Context) {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Error retrieving subscriptions."})
|
||||
return
|
||||
}
|
||||
|
||||
licenceCategories, err := uc.DriversLicenceService.GetAllCategories()
|
||||
if err != nil {
|
||||
logger.Error.Printf("Error retrieving licence categories: %v", err)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Error retrieving licence categories."})
|
||||
return
|
||||
}
|
||||
logger.Error.Printf("licenceCategories: %#v", licenceCategories)
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"user": user.Safe(),
|
||||
"subscriptions": subscriptions,
|
||||
"user": user.Safe(),
|
||||
"subscriptions": subscriptions,
|
||||
"licence_categories": licenceCategories,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user