add constructor funcs for controllers

This commit is contained in:
kiwiidb
2022-01-19 14:35:46 +01:00
parent 0c80998b49
commit a83fbc6067
8 changed files with 46 additions and 7 deletions

View File

@@ -18,6 +18,14 @@ type AuthController struct {
svc *lib.LndhubService
}
func NewAuthController(svc *lib.LndhubService, secret []byte, expiry int) *AuthController {
return &AuthController{
svc: svc,
JWTSecret: secret,
JWTExpiry: expiry,
}
}
// Auth : Auth Controller
func (controller *AuthController) Auth(c echo.Context) error {
type RequestBody struct {