From c04f384cdbcdc2359b82de4e9fa6e5685ce9b74e Mon Sep 17 00:00:00 2001 From: Baitinq Date: Thu, 30 May 2024 19:07:32 +0200 Subject: rest-api: change route to /api/v1/file/ --- TODO | 1 + requests_examples.sh | 4 ++-- src/rest-api/cmd/main.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 1adf4ef..c389c56 100644 --- a/TODO +++ b/TODO @@ -2,3 +2,4 @@ maybe we can remove helmsman with bazel better managing of secrets (maybe we shouldnt have environment variables) test kafka with interface nixos-k3s repo +what do we do about batching diff --git a/requests_examples.sh b/requests_examples.sh index 7ae8ba8..3aa5179 100755 --- a/requests_examples.sh +++ b/requests_examples.sh @@ -6,7 +6,7 @@ curl -H "API_KEY: ${FS_TRACER_API_KEY}" -X POST -d ' "absolute_path": "/home/user/file.txt", "contents": "Hello, World!" } -' http://leunam.dev:9999/file/ +' http://leunam.dev:9999/api/v1/file/ -curl -H "API_KEY: ${FS_TRACER_API_KEY}" -X GET http://leunam.dev:9999/file/?path=%2Fhome%2Fuser%2Ffile.txt +curl -H "API_KEY: ${FS_TRACER_API_KEY}" -X GET http://leunam.dev:9999/api/v1/file/?path=%2Fhome%2Fuser%2Ffile.txt diff --git a/src/rest-api/cmd/main.go b/src/rest-api/cmd/main.go index 98f3722..ff91856 100644 --- a/src/rest-api/cmd/main.go +++ b/src/rest-api/cmd/main.go @@ -63,7 +63,7 @@ func main() { mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Hello folks!") }) - mux.Handle("/file/", handler) + mux.Handle("/api/v1/file/", handler) http.ListenAndServe(":8080", mux) } -- cgit 1.4.1