File refactoring

This commit is contained in:
MassiveBox 2025-04-11 18:42:45 +02:00
parent e23cc424f8
commit 6bca12c934
Signed by: massivebox
GPG key ID: 9B74D3A59181947D
5 changed files with 142 additions and 72 deletions

View file

@ -47,8 +47,11 @@ export function generateRandomString() {
}
export function IDsToAssetName(fileID: string, syncID: string) {
return `${fileID}-${syncID}.svg`;
}
export function IDsToAssetPath(fileID: string, syncID: string) {
return `${ASSETS_PATH}${fileID}-${syncID}.svg`
return `${ASSETS_PATH}${IDsToAssetName(fileID, syncID)}`
}
export function assetPathToIDs(assetPath: string): { fileID: string; syncID: string } | null {