Skip to content

Commit

Permalink
Fix #254 Support publish flag in v1 data agreement endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa committed Oct 16, 2023
1 parent 561616a commit 16e1953
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/config
6 changes: 5 additions & 1 deletion src/v1/handler/organization_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ type purpose struct {
Restriction string
Shared3PP bool
SSIID string
PublishFlag bool
}

type purposeReq struct {
Expand Down Expand Up @@ -640,7 +641,9 @@ func AddConsentPurposes(w http.ResponseWriter, r *http.Request) {
DataRetention: p.DataRetention,
Restriction: p.Restriction,
Shared3PP: p.Shared3PP,
SSIID: p.SSIID}
SSIID: p.SSIID,
PublishFlag: p.PublishFlag,
}

o.Purposes = append(o.Purposes, tempPurpose)
}
Expand Down Expand Up @@ -776,6 +779,7 @@ func UpdatePurposeByID(w http.ResponseWriter, r *http.Request) {
o.Purposes[i].DataRetention = uReq.DataRetention
o.Purposes[i].Restriction = uReq.Restriction
o.Purposes[i].Shared3PP = uReq.Shared3PP
o.Purposes[i].PublishFlag = uReq.PublishFlag
if (o.Purposes[i].AttributeType != uReq.AttributeType) ||
(o.Purposes[i].SSIID != uReq.SSIID) {
m := fmt.Sprintf("Can not modify attributeType or SSIID for purpose: %v organization: %v",
Expand Down

0 comments on commit 16e1953

Please sign in to comment.