Spaces:
Configuration error
Configuration error
| package user | |
| import ( | |
| "api.qobiltu.id/controller" | |
| "api.qobiltu.id/models" | |
| "api.qobiltu.id/services" | |
| "github.com/gin-gonic/gin" | |
| ) | |
| func UpdateProfile(c *gin.Context) { | |
| userProfile := services.UserProfileService{} | |
| userUpdateProfileController := controller.Controller[models.AccountDetails, models.AccountDetails, models.UserProfileResponse]{ | |
| Service: &userProfile.Service, | |
| } | |
| userUpdateProfileController.RequestJSON(c, func() { | |
| userUpdateProfileController.Service.Constructor = userUpdateProfileController.Request | |
| userUpdateProfileController.HeaderParse(c, func() { | |
| userUpdateProfileController.Service.Constructor.AccountID = userUpdateProfileController.AccountData.UserID | |
| }) | |
| userProfile.Update() | |
| }, | |
| ) | |
| } | |