We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2caa2d8 + 40b0303 commit e0cb992Copy full SHA for e0cb992
libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts
@@ -171,7 +171,7 @@ export class JsonApiSdkService {
171
data: {
172
id: entity[this.jsonApiSdkConfig.idKey].toString(),
173
type: getTypeForReq(entity.constructor.name),
174
- attributes,
+ ...(Object.keys(attributes).length > 0 ? { attributes } : {}),
175
...(Object.keys(relationships).length > 0 ? { relationships } : {}),
176
},
177
};
0 commit comments