From e5e4acdf03d768883363f7fdebbd9be38a5049dd Mon Sep 17 00:00:00 2001 From: Hari Krishna Date: Fri, 15 Mar 2024 06:55:26 +0000 Subject: [PATCH] modifed the endopoint --- backend/go-app/main.go | 4 ++-- frontend/src/views/Admin.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 97aede9d..ece4b594 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -4923,8 +4923,8 @@ func initHandlers() { r.HandleFunc("/api/v1/orgs/{orgId}/change", shuffle.HandleChangeUserOrg).Methods("POST", "OPTIONS") // Swaps to the org r.HandleFunc("/api/v1/orgs/{orgId}", shuffle.HandleDeleteOrg).Methods("DELETE", "OPTIONS") - r.HandleFunc("/api/v1/sub_orgs/{orgId}", shuffle.HandleGetSubOrgs).Methods("GET", "OPTIONS") - + r.HandleFunc("/api/v1/orgs/{orgId}/suborgs", shuffle.HandleGetSubOrgs).Methods("GET", "OPTIONS") + // This is a new API that validates if a key has been seen before. // Not sure what the best course of action is for it. r.HandleFunc("/api/v1/environments/{key}/stop", shuffle.HandleStopExecutions).Methods("GET", "POST", "OPTIONS") diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index 15351d38..159465af 100755 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -1120,7 +1120,7 @@ If you're interested, please let me know a time that works for you, or set up a return; } - fetch(`${globalUrl}/api/v1/sub_orgs/${orgId}`, { + fetch(`${globalUrl}/api/v1/orgs/${orgId}/suborgs`, { method: "GET", credentials: "include", headers: {