This commit is contained in:
tamaina 2021-02-13 02:29:29 +09:00
parent 758f1a0b53
commit 88ec710650

View file

@ -131,8 +131,9 @@ export default defineComponent({
})(),(async () => { })(),(async () => {
const fileIds = urlParams.get('fileIds'); const fileIds = urlParams.get('fileIds');
if (fileIds) { if (fileIds) {
const promises = Promise.all(fileIds.split(',').map(fileId => os.api('drive/files/show', { fileId }))); const promises = Promise.all(fileIds.split(',')
promises.then(files => this.files = files).catch(() => console.error('invalid fileIds')); .map(fileId => os.api('drive/files/show', { fileId }).catch(() => console.error(`invalid fileId: ${fileId}`))));
await promises.then(files => this.files = files).catch(() => console.error('invalid fileIds'));
} }
})(),]); })(),]);