Extensive mypy checking.
This commit is contained in:
@ -41,19 +41,19 @@ export class AccountService {
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<Account[]>;
|
||||
}
|
||||
|
||||
save(account: Account): Observable<Account> {
|
||||
save(account: Account): Observable<null> {
|
||||
return this.http
|
||||
.post<Account>(`${url}`, account)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<Account>;
|
||||
.post<null>(`${url}`, account)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<null>;
|
||||
}
|
||||
|
||||
update(account: Account): Observable<Account> {
|
||||
update(account: Account): Observable<null> {
|
||||
return this.http
|
||||
.put<Account>(`${url}/${account.id}`, account)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'update'))) as Observable<Account>;
|
||||
.put<null>(`${url}/${account.id}`, account)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'update'))) as Observable<null>;
|
||||
}
|
||||
|
||||
saveOrUpdate(account: Account): Observable<Account> {
|
||||
saveOrUpdate(account: Account): Observable<null> {
|
||||
if (!account.id) {
|
||||
return this.save(account);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user