diff options
Diffstat (limited to 'ufund-ui/src')
| -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");  | 
