Skip to content

Commit

Permalink
provider sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed May 18, 2024
1 parent 070f706 commit 920b0f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/features/need/need.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,15 @@ export class NeedService {
theAuditor: AllUserEntity,
thePurchaser: AllUserEntity,
needDetails: NeedParams,
theNestProvider: ProviderEntity,
): Promise<UpdateResult> {
return this.needRepository.update(needId, {
child: theChild,
socialWorker: theSw,
auditor: theAuditor,
purchaser: thePurchaser,
ngo: theNgo,
provider: theNestProvider,
...needDetails,
});
}
Expand Down
6 changes: 2 additions & 4 deletions src/features/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ export class SyncService {
nestAuditor,
nestPurchaser,
needDetails,
theNestProvider,
)
.then();
nestNeed = await this.needService.getNeedByFlaskId(nestNeed.flaskId);
Expand All @@ -762,10 +763,7 @@ export class SyncService {
if (!nestNeed) {
throw new ServerError('no need...', 504);
}
console.log(theNestProvider);
console.log("--------------------------------");
console.log(nestProviderNeedRelation);


if (!nestNeed.provider || !nestNeed.provider.name) {
throw new ServerError('no provider detected...', 505);
}
Expand Down

0 comments on commit 920b0f5

Please sign in to comment.