diff options
author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-18 12:55:16 -0400 |
---|---|---|
committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-18 12:55:16 -0400 |
commit | 45bb79cd56e93ee26f1227ed15a9161a59fe6f35 (patch) | |
tree | de0a16b95b4fc5e7a35500d6d1bf8c9f2a690d65 | |
parent | 4c965e92244316ac4f432efa6e8cebf70c0c1053 (diff) | |
download | JellySolutions-45bb79cd56e93ee26f1227ed15a9161a59fe6f35.tar.gz JellySolutions-45bb79cd56e93ee26f1227ed15a9161a59fe6f35.tar.bz2 JellySolutions-45bb79cd56e93ee26f1227ed15a9161a59fe6f35.zip |
Fixed logic on status checks
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts index 6ad0a5f..45346b4 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -106,9 +106,9 @@ export class CupboardComponent implements OnInit { console.log(need.id, need, "need updated"); this.cupboardService.updateNeed(need.id, need) .pipe(catchError((ex, r) => { - if (ex.status = 500) { + if (ex.status == 500) { this.statusText.next("Fields cannot be blank"); - } else if (ex.status = 400) { + } else if (ex.status == 400) { this.statusText.next("Goal must be greater than 0"); } else { this.statusText.next("Error on creating need"); @@ -141,9 +141,9 @@ export class CupboardComponent implements OnInit { console.log("form submitted. creating need: ", need); this.cupboardService.createNeed(need) .pipe(catchError((ex, r) => { - if (ex.status = 500) { + if (ex.status == 500) { this.statusText.next("Fields cannot be blank"); - } else if (ex.status = 400) { + } else if (ex.status == 400) { this.statusText.next("Goal must be greater than 0"); } else { this.statusText.next("Error on creating need"); |