controllers.NewUserController   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package controllers
2
3
import (
4
	"github.com/gofiber/fiber/v2"
5
	"github.com/memnix/memnix-rest/internal/user"
6
)
7
8
type UserController struct {
9
	user.IUseCase
10
}
11
12
func NewUserController(useCase user.IUseCase) UserController {
13
	return UserController{IUseCase: useCase}
14
}
15
16
func (u *UserController) GetName(c *fiber.Ctx) error {
17
	uuid := c.Params("uuid")
18
19
	return c.SendString(u.IUseCase.GetName(uuid))
20
}
21