File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ async function getPrivateFeed() {
2222 throw err ;
2323 }
2424 parsedResult = result ;
25+ parsedResult . rss . channel . item = parsedResult . rss . channel . item . slice ( 0 , 300 ) ;
2526 } ) ;
2627 }
2728 } catch ( error ) {
@@ -102,6 +103,8 @@ function encode(text) {
102103}
103104
104105async function callback ( ) {
106+ const privateFeedConfig = await getPrivateFeed ( ) ;
107+
105108 const posts = await Post . find ( ) . where ( 'status' ) . equals ( 'publish' ) . lean ( ) ;
106109
107110 // mongoose sort is slower
@@ -111,7 +114,6 @@ async function callback() {
111114
112115 const publicFeedAllConfig = cloneDeep ( rawFeedConfig ) ;
113116 const publicFeedConfig = cloneDeep ( rawFeedConfig ) ;
114- const privateFeedConfig = await getPrivateFeed ( ) ;
115117 const lastPost = posts [ posts . length - 1 ] ;
116118
117119 let episode = posts . length + 1 ;
You can’t perform that action at this time.
0 commit comments