mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
more tests for request service
This commit is contained in:
@@ -15,16 +15,16 @@ export class RemoteData<T> {
|
||||
constructor(
|
||||
private requestPending: boolean,
|
||||
private responsePending: boolean,
|
||||
private isSuccessFul: boolean,
|
||||
private isSuccessful: boolean,
|
||||
public error: RemoteDataError,
|
||||
public payload: T
|
||||
) {
|
||||
}
|
||||
|
||||
get state(): RemoteDataState {
|
||||
if (this.isSuccessFul === true && hasValue(this.payload)) {
|
||||
if (this.isSuccessful === true && hasValue(this.payload)) {
|
||||
return RemoteDataState.Success
|
||||
} else if (this.isSuccessFul === false) {
|
||||
} else if (this.isSuccessful === false) {
|
||||
return RemoteDataState.Failed
|
||||
} else if (this.requestPending === true) {
|
||||
return RemoteDataState.RequestPending
|
||||
|
Reference in New Issue
Block a user