when I want to send information as post Method to my Rest API, Angular sends empty fields and subsequently, my database saves the empty value.
But I want to prevent it and I don't want to send empty fields from my Angular to my Backends.
For example, in below example, Angular sends an "" in entityTypeName field and unfortunately, the Postgres DB will save empty instead of null.
{
createdAt: "2019-01-11T13:59:52.311678"
entityTypeName: ""
id: "1bd46fce-fc6f-410f-acaf-74d5964cf92b"
updatedAt: "2019-01-11T13:59:52.311678"
updatedBy: "admin@admin.com"
version: 0
}
I'm looking for a general solution that prevent sending empity values in Angular side in all situations.