Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 5a3dadf

Browse files
committed
Fix update to profile listsAllowed not working
1 parent 4ceb457 commit 5a3dadf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

controller/profiles.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ type UpdateProfileReq struct {
172172

173173
Zipcodes []models.ProfileDutchZipcode `json:"zipCodes"`
174174

175+
ListsAllowed *bool `json:"listsAllowed"`
176+
175177
Lables map[string]any `json:"labels" description:"custom labels that can be used by API users to identify profiles, the key needs to be a string and the value can be anything"`
176178

177179
OnMatch *models.ProfileOnMatch `json:"onMatch"`
@@ -266,6 +268,9 @@ var routeModifyProfile = routeBuilder.R{
266268
if body.Lables != nil {
267269
ctx.Profile.Lables = body.Lables
268270
}
271+
if body.ListsAllowed != nil {
272+
ctx.Profile.ListsAllowed = *body.ListsAllowed
273+
}
269274

270275
err = ctx.DBConn.UpdateByID(ctx.Profile)
271276
if err != nil {

0 commit comments

Comments
 (0)