Fix: HTTP handling was broken after updating libs.

This commit is contained in:
baldo 2016-06-07 14:40:05 +02:00
parent 03083b819b
commit c3d527f2bc
5 changed files with 14 additions and 13 deletions
app/scripts/directives

View file

@ -159,11 +159,11 @@ angular.module('ffffng')
}
$scope.error = null;
$scope.save(node).catch(function (response, code) {
$scope.save(node).catch(function (response) {
// error
switch (code) {
switch (response.status) {
case 409: // conflict
$scope.error = duplicateError[response.field];
$scope.error = duplicateError[response.data.field];
break;
default:
$scope.error = 'Es ist ein Fehler aufgetreten. Versuche es später noch einmal.';

View file

@ -15,8 +15,8 @@ angular.module('ffffng')
$scope.error = null;
$scope.onSubmit(token)
.catch(function (response, code) {
switch (code) {
.catch(function (response) {
switch (response.status) {
case 404: // not found
$scope.error = 'Zum Token wurde kein passender Eintrag gefunden.';
break;