mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
Switched to storing requests based on UUID, generalized UUIDIndexReducer to work with any type of index
This commit is contained in:
@@ -12,7 +12,7 @@ export class RequestEntry {
|
||||
}
|
||||
|
||||
export interface RequestState {
|
||||
[key: string]: RequestEntry
|
||||
[uuid: string]: RequestEntry
|
||||
}
|
||||
|
||||
// Object.create(null) ensures the object has no default js properties (e.g. `__proto__`)
|
||||
@@ -41,7 +41,7 @@ export function requestReducer(state = initialState, action: RequestAction): Req
|
||||
|
||||
function configureRequest(state: RequestState, action: RequestConfigureAction): RequestState {
|
||||
return Object.assign({}, state, {
|
||||
[action.payload.href]: {
|
||||
[action.payload.uuid]: {
|
||||
request: action.payload,
|
||||
requestPending: true,
|
||||
responsePending: false,
|
||||
|
Reference in New Issue
Block a user