Spaces:
Runtime error
Runtime error
Download controller/user/user_update_profile_controller.go from lifedebugger/quzuu-api-dev: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/lifedebugger/quzuu-api-dev/resolve/main/controller/user/user_update_profile_controller.go
- Command line
-
hf download hf://spaces/lifedebugger/quzuu-api-dev/controller/user/user_update_profile_controller.go
-
curl -L -o user_update_profile_controller.go https://huggingface.co/spaces/lifedebugger/quzuu-api-dev/resolve/main/controller/user/user_update_profile_controller.go
770 Bytes
| package user | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "godp.abdanhafidz.com/controller" | |
| "godp.abdanhafidz.com/models" | |
| "godp.abdanhafidz.com/services" | |
| ) | |
| 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() | |
| }, | |
| ) | |
| } | |