NAPPDesafio/api/application/auth/controller.go
2024-07-21 00:15:14 -03:00

25 lines
460 B
Go

package authmodule
import (
authdto "api/application/auth/dto"
"api/models/api"
)
type Controller interface {
Authorization(data *authdto.AuthDto) (*api.Response, int, error)
}
type controller struct {
AuthService
}
func newController(service AuthService) Controller {
return &controller{
AuthService: service,
}
}
func (c *controller) Authorization(data *authdto.AuthDto) (*api.Response, int, error) {
return c.AuthService.Authorization(data)
}