aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
index 85ffd17..88ab46c 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
@@ -1,4 +1,4 @@
-import {Component, Input, OnInit, ViewChild} from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
import { CupboardService } from '../../services/cupboard.service';
import { Need, GoalType } from '../../models/Need';
import { userType } from '../../models/User';
@@ -99,7 +99,7 @@ export class CupboardComponent implements OnInit {
if (ex.status == 500) {
this.statusText.next("Fields cannot be blank");
} else if (ex.status == 400) {
- this.statusText.next("Goal must be greater than 0");
+ this.statusText.next(ex.error);
} else {
this.statusText.next("Error on creating need");
}
@@ -136,7 +136,7 @@ export class CupboardComponent implements OnInit {
if (ex.status == 500) {
this.statusText.next("Fields cannot be blank");
} else if (ex.status == 400) {
- this.statusText.next("Goal must be greater than 0");
+ this.statusText.next(ex.error);
} else {
this.statusText.next("Error on creating need");
}