changed + e to , e

This commit is contained in:
Abhinav-grd 2021-02-22 13:20:06 +05:30
parent ac85460ed5
commit 55047a4313
3 changed files with 9 additions and 9 deletions

View file

@ -107,7 +107,7 @@ const getCollections = async (
); );
return await Promise.all(promises); return await Promise.all(promises);
} catch (e) { } catch (e) {
console.log('getCollections failed- ' + e); console.log('getCollections failed- ', e.response);
} }
}; };
@ -118,8 +118,8 @@ export const getLocalCollections = async (): Promise<collection[]> => {
}; };
export const getCollectionUpdationTime = async (): Promise<number> => { export const getCollectionUpdationTime = async (): Promise<number> => {
return await localForage.getItem<number>(COLLECTION_UPDATION_TIME) ?? 0; return (await localForage.getItem<number>(COLLECTION_UPDATION_TIME)) ?? 0;
} };
export const syncCollections = async (token: string, key: string) => { export const syncCollections = async (token: string, key: string) => {
const localCollections = await getLocalCollections(); const localCollections = await getLocalCollections();
@ -268,7 +268,7 @@ const createCollection = async (
); );
return response.data.collection; return response.data.collection;
} catch (e) { } catch (e) {
console.log('create Collection failed ' + e); console.log('create Collection failed ', e);
} }
}; };
@ -326,7 +326,7 @@ const addToCollection = async (collection: collection, files: file[]) => {
{ 'X-Auth-Token': token } { 'X-Auth-Token': token }
); );
} catch (e) { } catch (e) {
console.log('Add to collection Failed ' + e); console.log('Add to collection Failed ', e);
} }
}; };
const removeFromCollection = async (collection: collection, files: file[]) => { const removeFromCollection = async (collection: collection, files: file[]) => {
@ -349,7 +349,7 @@ const removeFromCollection = async (collection: collection, files: file[]) => {
{ 'X-Auth-Token': token } { 'X-Auth-Token': token }
); );
} catch (e) { } catch (e) {
console.log('remove from collection failed ' + e); console.log('remove from collection failed ', e);
} }
}; };

View file

@ -50,7 +50,7 @@ class DownloadManager {
} }
return await this.thumbnailDownloads.get(file.id); return await this.thumbnailDownloads.get(file.id);
} catch (e) { } catch (e) {
console.log('get preview Failed' + e); console.log('get preview Failed' , e );
} }
} }
@ -72,7 +72,7 @@ class DownloadManager {
); );
return URL.createObjectURL(new Blob([decrypted])); return URL.createObjectURL(new Blob([decrypted]));
} catch (e) { } catch (e) {
console.log('get file failed ' + e); console.log('get file failed ' , e );
} }
})(); })();
this.fileDownloads.set(file.id, download); this.fileDownloads.set(file.id, download);

View file

@ -151,7 +151,7 @@ export const getFiles = async (
} while (resp.data.diff.length === limit); } while (resp.data.diff.length === limit);
return await Promise.all(promises); return await Promise.all(promises);
} catch (e) { } catch (e) {
console.log('Get files failed' + e); console.log('Get files failed' , e );
} }
}; };