This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new c8c2a5ab2 fix: scope api helper should accept blueprint parameter as 
singular (#6276)
c8c2a5ab2 is described below

commit c8c2a5ab2c9e39a62dacd2af9548a60531508512
Author: Klesh Wong <[email protected]>
AuthorDate: Wed Oct 18 17:54:32 2023 +0800

    fix: scope api helper should accept blueprint parameter as singular (#6276)
---
 backend/helpers/srvhelper/scope_service_helper.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/helpers/srvhelper/scope_service_helper.go 
b/backend/helpers/srvhelper/scope_service_helper.go
index 977b420fc..d7197648c 100644
--- a/backend/helpers/srvhelper/scope_service_helper.go
+++ b/backend/helpers/srvhelper/scope_service_helper.go
@@ -33,7 +33,7 @@ import (
 type ScopePagination struct {
        Pagination   `mapstructure:",squash"`
        ConnectionId uint64 `json:"connectionId" mapstructure:"connectionId" 
validate:"required"`
-       Blueprints   bool   `json:"blueprints" mapstructure:"blueprints"`
+       Blueprint    bool   `json:"blueprint" mapstructure:"blueprint"`
 }
 
 type ScopeDetail[S plugin.ToolLayerScope, SC plugin.ToolLayerScopeConfig] 
struct {
@@ -131,7 +131,7 @@ func (scopeSrv *ScopeSrvHelper[C, S, SC]) 
GetScopesPage(pagination *ScopePaginat
                        Scope:       scope,
                        ScopeConfig: 
scopeSrv.getScopeConfig(scope.ScopeScopeConfigId()),
                }
-               if pagination.Blueprints {
+               if pagination.Blueprint {
                        scopeDetail.Blueprints = 
scopeSrv.getAllBlueprinsByScope(scope.ScopeConnectionId(), scope.ScopeId())
                }
                data[i] = scopeDetail

Reply via email to