Manav Rathi 1 년 전
부모
커밋
cd4b2a6810
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 0 5
      web/apps/photos/src/services/watchFolder/utils.ts
  2. 6 1
      web/apps/photos/src/services/watchFolder/watchFolderService.ts

+ 0 - 5
web/apps/photos/src/services/watchFolder/utils.ts

@@ -1,5 +0,0 @@
-export const getParentFolderName = (filePath: string) => {
-    const folderPath = filePath.substring(0, filePath.lastIndexOf("/"));
-    const folderName = folderPath.substring(folderPath.lastIndexOf("/") + 1);
-    return folderName;
-};

+ 6 - 1
web/apps/photos/src/services/watchFolder/watchFolderService.ts

@@ -15,7 +15,6 @@ import { groupFilesBasedOnCollectionID } from "utils/file";
 import { getValidFilesToUpload } from "utils/watch";
 import { removeFromCollection } from "../collectionService";
 import { getLocalFiles } from "../fileService";
-import { getParentFolderName } from "./utils";
 import {
     diskFileAddedCallback,
     diskFileRemovedCallback,
@@ -642,3 +641,9 @@ class watchFolderService {
 }
 
 export default new watchFolderService();
+
+export const getParentFolderName = (filePath: string) => {
+    const folderPath = filePath.substring(0, filePath.lastIndexOf("/"));
+    const folderName = folderPath.substring(folderPath.lastIndexOf("/") + 1);
+    return folderName;
+};