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 {
8484 params .append (' object_id' , ' ' + this .objectId )
8585 params .append (' limit' , ACTIVITY_FETCH_LIMIT )
8686
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+
88101 let activities = response .data .ocs .data
89102 if (this .filter === ' deck' ) {
90103 // 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 {
95108 })
96109 }
97110 this .activities .push (... activities)
98- if (response . data . ocs . meta . statuscode === 304 || activities .length === 0 ) {
111+ if (activities .length === 0 ) {
99112 this .endReached = true
100113 return []
101114 }
You can’t perform that action at this time.
0 commit comments