diff options
| author | Alexander Kavon <hawk@alexkavon.com> | 2023-11-27 14:48:44 -0500 |
|---|---|---|
| committer | Alexander Kavon <hawk@alexkavon.com> | 2023-11-27 14:48:44 -0500 |
| commit | 1d05f918887e9ba4576149513e5df0bb57e6bd72 (patch) | |
| tree | 2f5e94e21f90183509fe1ae52905c47d67a3c5d0 /src/user/routes.go | |
| parent | 8a30281eff35623d1a68642e4d94c814d1b47a0c (diff) | |
config updates, rename user model, load auth routes, initial templating poc
Diffstat (limited to 'src/user/routes.go')
| -rw-r--r-- | src/user/routes.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/user/routes.go b/src/user/routes.go new file mode 100644 index 0000000..b265e67 --- /dev/null +++ b/src/user/routes.go @@ -0,0 +1,33 @@ +package user + +import ( + "net/http" + + "gitlab.com/alexkavon/newsstand/src/server" +) + +var Routes = server.Routes{ + server.Route{ + Name: "Create", + Method: "POST", + Pattern: "/users", + AuthRequired: false, + HandlerFunc: Create, + }, + server.Route{ + Name: "Me", + Method: "GET", + Pattern: "/users/me", + AuthRequired: true, + HandlerFunc: Show, + }, +} + +func Create(s *server.Server) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + } +} + +func Show(s *server.Server) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) {} +} |
