File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,20 @@ export default {
84
84
params .append (' object_id' , ' ' + this .objectId )
85
85
params .append (' limit' , ACTIVITY_FETCH_LIMIT )
86
86
87
- const response = await axios .get (generateOcsUrl (` apps/activity/api/v2/activity/${ this .filter } ` ) + ' ?' + params)
87
+ const response = await axios .get (
88
+ generateOcsUrl (` apps/activity/api/v2/activity/${ this .filter } ` ) + ' ?' + params,
89
+ {
90
+ validateStatus : (status ) => {
91
+ return (status >= 200 && status < 300 ) || status === 304
92
+ },
93
+ },
94
+ )
95
+
96
+ if (response .status === 304 ) {
97
+ this .endReached = true
98
+ return []
99
+ }
100
+
88
101
let activities = response .data .ocs .data
89
102
if (this .filter === ' deck' ) {
90
103
// We need to manually filter activities here, since currently we use two different types and there is no way
@@ -95,7 +108,7 @@ export default {
95
108
})
96
109
}
97
110
this .activities .push (... activities)
98
- if (response . data . ocs . meta . statuscode === 304 || activities .length === 0 ) {
111
+ if (activities .length === 0 ) {
99
112
this .endReached = true
100
113
return []
101
114
}
You can’t perform that action at this time.
0 commit comments