Spaces:
Configuration error
Configuration error
Download controller/user/auth_update_profile_controller.go from lifedebugger/api-qobiltu-dev: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/lifedebugger/api-qobiltu-dev/resolve/main/controller/user/auth_update_profile_controller.go
- Command line
-
hf download hf://spaces/lifedebugger/api-qobiltu-dev/controller/user/auth_update_profile_controller.go
-
curl -L -o auth_update_profile_controller.go https://huggingface.co/spaces/lifedebugger/api-qobiltu-dev/resolve/main/controller/user/auth_update_profile_controller.go
751 Bytes
| 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.AccountDetails]{ | |
| Service: &userProfile.Service, | |
| } | |
| userUpdateProfileController.RequestJSON(c, func() { | |
| userUpdateProfileController.Service.Constructor = userUpdateProfileController.Request | |
| userUpdateProfileController.HeaderParse(c, func() { | |
| userUpdateProfileController.Service.Constructor.AccountID = uint(userUpdateProfileController.AccountData.UserID) | |
| }) | |
| userProfile.Update() | |
| }, | |
| ) | |
| } | |