Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package routes |
||
2 | |||
3 | import ( |
||
4 | "github.com/memnix/memnixrest/app/controllers" |
||
5 | "github.com/memnix/memnixrest/pkg/models" |
||
6 | ) |
||
7 | |||
8 | func registerAuthRoutes() { |
||
9 | // Get |
||
10 | routesMap["/user"] = routeStruct{ |
||
11 | Method: "GET", |
||
12 | Handler: controllers.User, |
||
13 | Permission: models.PermUser, |
||
14 | } |
||
15 | |||
16 | // Post |
||
17 | routesMap["/login"] = routeStruct{ |
||
18 | Method: "POST", |
||
19 | Handler: controllers.Login, |
||
20 | Permission: models.PermNone, |
||
21 | } |
||
22 | |||
23 | routesMap["/register"] = routeStruct{ |
||
24 | Method: "POST", |
||
25 | Handler: controllers.Register, |
||
26 | Permission: models.PermNone, |
||
27 | } |
||
28 | |||
29 | routesMap["/logout"] = routeStruct{ |
||
30 | Method: "POST", |
||
31 | Handler: controllers.Logout, |
||
32 | Permission: models.PermNone, |
||
33 | } |
||
35 |