Skip to content

Commit

Permalink
fix(json-api-nestjs): Allow empty atributes for sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
klerick committed Apr 21, 2024
1 parent d267a0e commit c3cc4a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class JsonApiSdkService {
data: {
id: entity[this.jsonApiSdkConfig.idKey].toString(),
type: getTypeForReq(entity.constructor.name),
attributes,
...(Object.keys(attributes).length > 0 ? { attributes } : {}),
...(Object.keys(relationships).length > 0 ? { relationships } : {}),
},
};
Expand Down

0 comments on commit c3cc4a5

Please sign in to comment.