Spaces:
Runtime error
Runtime error
Download controller/user/user_profile_controller.go from lifedebugger/pweb-api: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/spaces/lifedebugger/pweb-api/resolve/main/controller/user/user_profile_controller.go
- Command line
-
hf download hf://spaces/lifedebugger/pweb-api/controller/user/user_profile_controller.go
-
curl -L -o user_profile_controller.go https://huggingface.co/spaces/lifedebugger/pweb-api/resolve/main/controller/user/user_profile_controller.go
624 Bytes
| package user | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "pweb-api.abdanhafidz.com/controller" | |
| "pweb-api.abdanhafidz.com/models" | |
| "pweb-api.abdanhafidz.com/services" | |
| ) | |
| func Profile(c *gin.Context) { | |
| userProfile := services.UserProfileService{} | |
| userProfileController := controller.Controller[any, models.AccountDetails, models.UserProfileResponse]{ | |
| Service: &userProfile.Service, | |
| } | |
| userProfileController.HeaderParse(c, func() { | |
| userProfileController.Service.Constructor.AccountId = uint(userProfileController.AccountData.UserID) | |
| userProfile.Retrieve() | |
| userProfileController.Response(c) | |
| }, | |
| ) | |
| } | |