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