feat: complete template
This commit is contained in:
18
backend/modules/users/controller.go
Normal file
18
backend/modules/users/controller.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package users
|
||||
|
||||
import "github.com/gofiber/fiber/v3"
|
||||
|
||||
// @provider
|
||||
type Controller struct {
|
||||
svc *Service
|
||||
}
|
||||
|
||||
// List
|
||||
func (c *Controller) List(ctx fiber.Ctx) error {
|
||||
resp, err := c.svc.List(ctx.Context())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ctx.JSON(resp)
|
||||
}
|
||||
Reference in New Issue
Block a user