From 20db4981686b51e99d5c24568b144ac42f4acb9f Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:39:09 -0700 Subject: [PATCH] v1 stub --- cmd/server/v1.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/server/v1.go b/cmd/server/v1.go index af9b72c..5ff35ea 100644 --- a/cmd/server/v1.go +++ b/cmd/server/v1.go @@ -3,6 +3,7 @@ package main import ( "fmt" "net/http" + "path" "strings" ) @@ -11,5 +12,15 @@ func isV1(r *http.Request) bool { } func (s *S) serveV1(w http.ResponseWriter, r *http.Request) error { - return fmt.Errorf("not impl: v1") + switch path.Join(r.Method, r.URL.Path) { + case "PUT/v1/state/" + s.Session(r).ID + "/party": + return s.serveV1PutParty(w, r) + default: + http.NotFound(w, r) + } + return nil +} + +func (s *S) serveV1PutParty(w http.ResponseWriter, r *http.Request) error { + return fmt.Errorf("not impl") }