Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package controllers |
||
2 | |||
3 | import ( |
||
4 | "github.com/gofiber/fiber/v2" |
||
5 | "github.com/memnix/memnix-rest/internal/auth" |
||
6 | ) |
||
7 | |||
8 | type AuthController struct { |
||
9 | auth auth.IUseCase |
||
10 | } |
||
11 | |||
12 | func NewAuthController(auth auth.IUseCase) AuthController { |
||
13 | return AuthController{auth: auth} |
||
14 | } |
||
15 | |||
16 | func (a *AuthController) Login(c *fiber.Ctx) error { |
||
17 | return c.SendString("Login") |
||
18 | } |
||
19 | |||
20 | func (a *AuthController) Register(c *fiber.Ctx) error { |
||
21 | return c.SendString("Register") |
||
22 | } |
||
23 | |||
24 | func (a *AuthController) Logout(c *fiber.Ctx) error { |
||
25 | return c.SendString("Logout") |
||
26 | } |
||
27 | |||
28 | func (a *AuthController) RefreshToken(c *fiber.Ctx) error { |
||
29 | return c.SendString("RefreshToken") |
||
30 | } |
||
31 |