now correctly continue fetching every page for the search instead of stopping on the first. also added the launch.sh and updated the gitignore
This commit is contained in:
@@ -22,3 +22,7 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
.env
|
||||
tsconfig.tsbuildinfo
|
||||
package-lock.json
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
/snap/bin/node /home/nonroot/unloze-wrapper/server.js
|
||||
@@ -204,6 +204,11 @@ export default defineComponent({
|
||||
this.files.push(...(data.files || []));
|
||||
this.nextToken = data.nextToken;
|
||||
this.loading = false;
|
||||
|
||||
// Keep fetching until we've retrieved every page for this prefix/search
|
||||
if (data.isTruncated && data.nextToken) {
|
||||
await this.fetchList(false);
|
||||
}
|
||||
},
|
||||
onSearch() {
|
||||
this.nextToken = null;
|
||||
|
||||
Reference in New Issue
Block a user