Skip to content

Commit 68caf66

Browse files
committed
Update Group model
1 parent 9a04100 commit 68caf66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/models/Group.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type Binding = {
1010
rules: {
1111
type: string;
1212
operator: string;
13+
key: string;
1314
value: string;
1415
}[];
1516
};
@@ -28,12 +29,12 @@ export class Group extends BaseModel implements Partial<JsonApiMapping> {
2829
super(data);
2930
this.name = data?.attributes?.name ?? data?.name ?? '';
3031
this.description = data?.attributes?.description ?? data?.description ?? '';
31-
this.bindings = data?.attributes?.bindings ?? [];
32+
this.bindings = data?.attributes?.bindings ?? data?.bindings ?? [];
3233
}
3334

3435
jsonApiMapping() {
3536
return {
36-
attributes: ['name', 'description'],
37+
attributes: ['name', 'description', 'bindings'],
3738
relationships: {},
3839
};
3940
}

0 commit comments

Comments
 (0)