Spaces:
Runtime error
Runtime error
Download controller/auth/auth_login_controller.go from lifedebugger/quzuu-api-dev: direct link, hf CLI and curl.
- Browser
- Download file 636 Bytes
-
https://huggingface.co/spaces/lifedebugger/quzuu-api-dev/resolve/main/controller/auth/auth_login_controller.go
- Command line
-
hf download hf://spaces/lifedebugger/quzuu-api-dev/controller/auth/auth_login_controller.go
-
curl -L -o auth_login_controller.go https://huggingface.co/spaces/lifedebugger/quzuu-api-dev/resolve/main/controller/auth/auth_login_controller.go
636 Bytes
| package auth | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "godp.abdanhafidz.com/controller" | |
| "godp.abdanhafidz.com/models" | |
| "godp.abdanhafidz.com/services" | |
| ) | |
| func Login(c *gin.Context) { | |
| authentication := services.AuthenticationService{} | |
| loginController := controller.Controller[models.LoginRequest, models.Account, models.AuthenticatedUser]{ | |
| Service: &authentication.Service, | |
| } | |
| loginController.RequestJSON(c, func() { | |
| loginController.Service.Constructor.Email = loginController.Request.Email | |
| loginController.Service.Constructor.Password = loginController.Request.Password | |
| authentication.Authenticate() | |
| }) | |
| } | |