From cc19724277dcffb376dede170355d5c7cf31acbc Mon Sep 17 00:00:00 2001 From: Max Richter Date: Tue, 4 Nov 2025 12:26:38 +0100 Subject: [PATCH] chore: update --- server/.air.toml | 2 +- server/cmd/marka-server/main.go | 2 ++ server/internal/handler/handler.go | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/.air.toml b/server/.air.toml index 7ce063e..136ccad 100644 --- a/server/.air.toml +++ b/server/.air.toml @@ -9,7 +9,7 @@ cmd = "go build -o ./tmp/marka-server ./cmd/marka-server" bin = "./tmp/marka-server" # Command to run the application with arguments. -full_bin = "./tmp/marka-server -root=/home/max/Notes/resources -addr=:8080 -playground-root=./playground" +full_bin = "MARKA_API_KEY='SECRET' ./tmp/marka-server -root=/home/max/Notes/resources -addr=:8080 -playground-root=./playground" # Watch these file extensions. include_ext = ["go", "http"] diff --git a/server/cmd/marka-server/main.go b/server/cmd/marka-server/main.go index ee96665..85267f0 100644 --- a/server/cmd/marka-server/main.go +++ b/server/cmd/marka-server/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "fmt" "log" "net/http" "os" @@ -62,6 +63,7 @@ func main() { must(err) apiKey := os.Getenv("MARKA_API_KEY") + fmt.Println(apiKey) http.Handle("/", handler.NewHandler(fsAdapter, apiKey)) log.Printf("listening on %s, roots=%s", *addr, strings.Join(absRoots, ", ")) diff --git a/server/internal/handler/handler.go b/server/internal/handler/handler.go index 84a728a..ebd6188 100644 --- a/server/internal/handler/handler.go +++ b/server/internal/handler/handler.go @@ -99,7 +99,6 @@ func (h *Handler) post(w http.ResponseWriter, r *http.Request, target string) { } writeJSON(w, http.StatusOK, map[string]any{"success": true}) - return } func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {