mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-08-20 07:34:28 -05:00
Download private storage before pulling data from Splatnet
This commit is contained in:
@@ -43,6 +43,11 @@ export async function update(config = 'default') {
|
||||
|
||||
let settings = configs[config];
|
||||
|
||||
// Download private files to get updated tokens if needed
|
||||
if (canSync()) {
|
||||
await (new S3Syncer).download(false);
|
||||
}
|
||||
|
||||
await Promise.all(updaters().map(async updater => {
|
||||
updater.settings = settings;
|
||||
try {
|
||||
|
||||
@@ -5,14 +5,14 @@ import mime from 'mime-types';
|
||||
|
||||
export default class S3Syncer
|
||||
{
|
||||
download() {
|
||||
download(dist = true, storage = true) {
|
||||
this.log('Downloading files...');
|
||||
|
||||
return Promise.all([
|
||||
this.syncClient.sync(this.publicBucket, `${this.localPath}/dist`, {
|
||||
dist && this.syncClient.sync(this.publicBucket, `${this.localPath}/dist`, {
|
||||
filters: this.filters,
|
||||
}),
|
||||
this.syncClient.sync(this.privateBucket, `${this.localPath}/storage`, {
|
||||
storage && this.syncClient.sync(this.privateBucket, `${this.localPath}/storage`, {
|
||||
filters: this.privateFilters,
|
||||
}),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user