mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
cleaned up remotedata for a better separation of concerns, moved statuscode and errormsg in to RemoteDataError object, moved pageInfo to PaginatedList object in the payload
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { PageInfo } from '../shared/page-info.model';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { RemoteDataError } from './remote-data-error';
|
||||
|
||||
export enum RemoteDataState {
|
||||
RequestPending = 'RequestPending',
|
||||
@@ -13,13 +13,10 @@ export enum RemoteDataState {
|
||||
*/
|
||||
export class RemoteData<T> {
|
||||
constructor(
|
||||
public self: string,
|
||||
private requestPending: boolean,
|
||||
private responsePending: boolean,
|
||||
private isSuccessFul: boolean,
|
||||
public errorMessage: string,
|
||||
public statusCode: string,
|
||||
public pageInfo: PageInfo,
|
||||
public error: RemoteDataError,
|
||||
public payload: T
|
||||
) {
|
||||
}
|
||||
|
Reference in New Issue
Block a user