@dataclouder/ngx-core 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3194,6 +3194,10 @@ class EntityCommunicationService {
|
|
|
3194
3194
|
findOne(id) {
|
|
3195
3195
|
return this.httpService.getHttp({ service: `api/${this.serviceName}/${id}`, host: this.customHost });
|
|
3196
3196
|
}
|
|
3197
|
+
findOneByQuery(query, projection) {
|
|
3198
|
+
// Can find only one with query and projection, query can be id. { id: 'id' }
|
|
3199
|
+
return this.httpService.postHttp({ service: `api/${this.serviceName}/find-one`, data: { query, projection }, host: this.customHost });
|
|
3200
|
+
}
|
|
3197
3201
|
createOrUpdate(entity) {
|
|
3198
3202
|
// if Id is present then in object, then Update all props in the object
|
|
3199
3203
|
return this.httpService.postHttp({ service: `api/${this.serviceName}`, data: entity, host: this.customHost });
|