This repository was archived by the owner on Aug 10, 2024. It is now read-only.
File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
-
2
1
// let's be nice
3
2
const MAX_SEARCH_TERMS = 5 ;
4
3
const DEFAULT_LIMIT = 40 ;
@@ -61,10 +60,11 @@ async function getFeedSkeleton(request) {
61
60
let responsePromises = [ ] ;
62
61
63
62
for ( let searchTerm of searchTerms ) {
64
- let url = "https://search.bsky.social/search/posts?"
65
- + new URLSearchParams ( {
66
- q : searchTerm ,
67
- } ) ;
63
+ let url =
64
+ "https://search.bsky.social/search/posts?" +
65
+ new URLSearchParams ( {
66
+ q : searchTerm ,
67
+ } ) ;
68
68
responsePromises . push ( fetch ( url ) ) ;
69
69
}
70
70
let responses = await Promise . all ( responsePromises ) ;
@@ -84,11 +84,13 @@ async function getFeedSkeleton(request) {
84
84
timestampURLs . push ( [ timestamp , atURL ] ) ;
85
85
}
86
86
87
- timestampURLs = timestampURLs . toSorted ( ( b , a ) => ( a === b ) ? 0 : ( a < b ) ? - 1 : 1 ) ;
87
+ timestampURLs = timestampURLs . toSorted ( ( b , a ) =>
88
+ a === b ? 0 : a < b ? - 1 : 1
89
+ ) ;
88
90
var feed = [ ] ;
89
91
for ( let timestampUrl of timestampURLs ) {
90
92
let atUrl = timestampUrl [ 1 ] ;
91
- feed . push ( { post : atUrl } ) ;
93
+ feed . push ( { post : atUrl } ) ;
92
94
}
93
95
// TODO apply this after adding pagination support
94
96
// feed = feed.slice(0, limit);
You can’t perform that action at this time.
0 commit comments