Skip to content

Commit 3101fca

Browse files
committed
fix(json-api-nestjs): Allow empty atributes for sdk
1 parent 2003f41 commit 3101fca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class JsonApiSdkService {
171171
data: {
172172
id: entity[this.jsonApiSdkConfig.idKey].toString(),
173173
type: getTypeForReq(entity.constructor.name),
174-
attributes,
174+
...(Object.keys(attributes).length > 0 ? { attributes } : {}),
175175
...(Object.keys(relationships).length > 0 ? { relationships } : {}),
176176
},
177177
};

0 commit comments

Comments
 (0)