aboutsummaryrefslogtreecommitdiff
path: root/src/user/routes.go
diff options
context:
space:
mode:
authorAlexander Kavon <hawk@alexkavon.com>2023-11-27 14:48:44 -0500
committerAlexander Kavon <hawk@alexkavon.com>2023-11-27 14:48:44 -0500
commit1d05f918887e9ba4576149513e5df0bb57e6bd72 (patch)
tree2f5e94e21f90183509fe1ae52905c47d67a3c5d0 /src/user/routes.go
parent8a30281eff35623d1a68642e4d94c814d1b47a0c (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.go33
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) {}
+}