mirror of
https://github.com/samnyan/aqua-viewer.git
synced 2026-04-26 01:19:53 -05:00
[general] Change error message handling to error interceptor
This commit is contained in:
parent
1e327e6d32
commit
c64ae559fd
|
|
@ -28,7 +28,7 @@ export class AmazonProfileComponent implements OnInit {
|
|||
data => {
|
||||
this.profile = data;
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export class AmazonRatingComponent implements OnInit {
|
|||
}
|
||||
this.topRating.forEach(item => this.topTotal += item.rating);
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
|
||||
this.api.get('api/game/chuni/amazon/rating/recent', param).subscribe(
|
||||
|
|
@ -48,7 +48,7 @@ export class AmazonRatingComponent implements OnInit {
|
|||
}
|
||||
this.recentRating.forEach(item => this.recentTotal += item.rating);
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export class AmazonRecentComponent implements OnInit {
|
|||
});
|
||||
return data.content;
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ApiService} from '../../../../api.service';
|
||||
import {AuthenticationService} from '../../../../auth/authentication.service';
|
||||
import {MessageService} from '../../../../message.service';
|
||||
|
|
@ -31,7 +31,7 @@ export class AmazonSettingComponent implements OnInit {
|
|||
data => {
|
||||
this.profile = data;
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
this.aimeId = String(this.auth.currentUserValue.extId);
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ export class AmazonSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export class AmazonSongPlaylogComponent implements OnInit {
|
|||
this.records.push(x);
|
||||
});
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
this.dbService.getByID<ChuniMusic>('chuniMusic', this.id).then(
|
||||
m => this.songInfo = m
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class DivaContestComponent implements OnInit {
|
|||
this.load();
|
||||
},
|
||||
error => {
|
||||
this.messageService.notice(error.statusText);
|
||||
this.messageService.notice(error);
|
||||
this.load();
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export class DivaFestaEditComponent implements OnInit {
|
|||
console.log(data);
|
||||
this.router.navigateByUrl('/diva/management/festa');
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class DivaFestaComponent implements OnInit {
|
|||
this.load();
|
||||
},
|
||||
error => {
|
||||
this.messageService.notice(error.statusText);
|
||||
this.messageService.notice(error);
|
||||
this.load();
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ export class DivaNewsComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
this.api.get('api/manage/diva/news').subscribe(
|
||||
data => this.createNews(data),
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
this.api.get('api/manage/diva/warning').subscribe(
|
||||
data => this.createWarning(data),
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -48,14 +48,14 @@ export class DivaNewsComponent implements OnInit {
|
|||
submitNews() {
|
||||
this.api.put('api/manage/diva/news', this.newsForm.value).subscribe(
|
||||
data => this.createNews(data),
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
submitWarning() {
|
||||
this.api.put('api/manage/diva/warning', this.newsForm.value).subscribe(
|
||||
data => this.createWarning(data),
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export class DivaPvRecordComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export class DivaRecordDetailComponent implements OnInit {
|
|||
recordId
|
||||
}).subscribe(
|
||||
data => this.messageService.notice('OK'),
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ export class DivaRecordDetailComponent implements OnInit {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
const param = new HttpParams().set('pdId', String(this.pdId));
|
||||
this.api.get('api/game/diva/playerInfo', param).subscribe(
|
||||
data => this.profile = data,
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
this.loadRival();
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
const param = new HttpParams().set('pdId', String(this.pdId));
|
||||
this.api.get('api/game/diva/playerInfo/rival', param).subscribe(
|
||||
data => this.rival = data.rival,
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -83,7 +83,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -108,7 +108,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -131,7 +131,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -158,7 +158,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -187,7 +187,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -220,7 +220,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
x => {
|
||||
this.profile = x;
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -244,7 +244,7 @@ export class DivaSettingComponent implements OnInit {
|
|||
this.profile = x;
|
||||
this.loadRival();
|
||||
this.messageService.notice('OK');
|
||||
}, error => this.messageService.notice(error.statusText)
|
||||
}, error => this.messageService.notice(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export class OngekiCardComponent implements OnInit {
|
|||
});
|
||||
return data.content;
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export class OngekiRecentComponent implements OnInit {
|
|||
});
|
||||
return data.content;
|
||||
},
|
||||
error => this.messageService.notice(error.statusText)
|
||||
error => this.messageService.notice(error)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user