From 63fe9e4df9370b9213678118bae490076d7bfa03 Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Thu, 5 Oct 2023 10:43:41 +0530 Subject: [PATCH] Fix #198 Fix get admin logs v2 api to get organization id from request header instead for request path variable --- resources/config | 2 +- src/handlerv2/getorglogs_handler.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/config b/resources/config index 5a5f66a..0dbba22 160000 --- a/resources/config +++ b/resources/config @@ -1 +1 @@ -Subproject commit 5a5f66a3fedf0660d85ae86cf902b9eac6a2f064 +Subproject commit 0dbba2260378c97741528d02a9125836cc697e26 diff --git a/src/handlerv2/getorglogs_handler.go b/src/handlerv2/getorglogs_handler.go index 1b772e4..b619b87 100644 --- a/src/handlerv2/getorglogs_handler.go +++ b/src/handlerv2/getorglogs_handler.go @@ -8,7 +8,6 @@ import ( "github.com/bb-consent/api/src/actionlog" "github.com/bb-consent/api/src/common" "github.com/bb-consent/api/src/config" - "github.com/gorilla/mux" ) type orgLog struct { @@ -27,7 +26,7 @@ type orgLogsResp struct { // GetOrgLogs Get action logs for the organization func GetOrgLogs(w http.ResponseWriter, r *http.Request) { - orgID := mux.Vars(r)["orgID"] + orgID := r.Header.Get(config.OrganizationId) startID, limit := common.ParsePaginationQueryParameters(r) if limit == 0 {