From 45e7b776ab9a0d3b4ede9bb10b57f0cca7503b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesko=20Ansch=C3=BCtz?= Date: Sun, 22 Mar 2026 18:35:43 +0100 Subject: [PATCH] Erweitere Basis-API um Status-Endpunkte Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- server/backend/internal/httpapi/router.go | 2 ++ server/backend/internal/httpapi/router_test.go | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server/backend/internal/httpapi/router.go b/server/backend/internal/httpapi/router.go index 785b19b..a50c72f 100644 --- a/server/backend/internal/httpapi/router.go +++ b/server/backend/internal/httpapi/router.go @@ -20,6 +20,8 @@ func NewRouter(store playerStatusStore) http.Handler { "version": "dev", "tools": []string{ "message-wall-resolve", + "screen-status-list", + "screen-status-detail", }, }) }) diff --git a/server/backend/internal/httpapi/router_test.go b/server/backend/internal/httpapi/router_test.go index 37887c1..606d02d 100644 --- a/server/backend/internal/httpapi/router_test.go +++ b/server/backend/internal/httpapi/router_test.go @@ -64,13 +64,21 @@ func TestRouterBaseAPI(t *testing.T) { t.Fatalf("version = %q, want %q", got, want) } - if got, want := len(response.Tools), 1; got != want { + if got, want := len(response.Tools), 3; got != want { t.Fatalf("len(tools) = %d, want %d", got, want) } if got, want := response.Tools[0], "message-wall-resolve"; got != want { t.Fatalf("tool[0] = %q, want %q", got, want) } + + if got, want := response.Tools[1], "screen-status-list"; got != want { + t.Fatalf("tool[1] = %q, want %q", got, want) + } + + if got, want := response.Tools[2], "screen-status-detail"; got != want { + t.Fatalf("tool[2] = %q, want %q", got, want) + } } func TestRouterMeta(t *testing.T) {