Ver Fonte

changed + e to , e

Abhinav-grd há 4 anos atrás
pai
commit
55047a4313

+ 6 - 6
src/services/collectionService.ts

@@ -107,7 +107,7 @@ const getCollections = async (
         );
         return await Promise.all(promises);
     } 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> => {
-    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) => {
     const localCollections = await getLocalCollections();
@@ -268,7 +268,7 @@ const createCollection = async (
         );
         return response.data.collection;
     } 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 }
         );
     } catch (e) {
-        console.log('Add to collection Failed ' + e);
+        console.log('Add to collection Failed ', e);
     }
 };
 const removeFromCollection = async (collection: collection, files: file[]) => {
@@ -349,7 +349,7 @@ const removeFromCollection = async (collection: collection, files: file[]) => {
             { 'X-Auth-Token': token }
         );
     } catch (e) {
-        console.log('remove from collection failed ' + e);
+        console.log('remove from collection failed ', e);
     }
 };
 

+ 2 - 2
src/services/downloadManager.ts

@@ -50,7 +50,7 @@ class DownloadManager {
             }
             return await this.thumbnailDownloads.get(file.id);
         } 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]));
                 } catch (e) {
-                    console.log('get file failed ' + e);
+                    console.log('get file failed ' , e );
                 }
             })();
             this.fileDownloads.set(file.id, download);

+ 1 - 1
src/services/fileService.ts

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