A decentralized music tracking and discovery platform built on AT Protocol 🎵

[api] trim directory path

+13 -4
+8 -2
apps/api/src/xrpc/app/rocksky/dropbox/getFiles.ts
··· 61 61 .where( 62 62 and( 63 63 eq(tables.users.did, did), 64 - eq(parentAlias.path, _.get(params, "at", "/Music")) 64 + eq( 65 + parentAlias.path, 66 + _.get(params, "at", "/Music").replace(/\/$/, "").trim() 67 + ) 65 68 ) 66 69 ) 67 70 .orderBy(asc(tables.dropboxDirectories.name)) ··· 81 84 .where( 82 85 and( 83 86 eq(tables.users.did, did), 84 - eq(tables.dropboxDirectories.path, _.get(params, "at", "/Music")) 87 + eq( 88 + tables.dropboxDirectories.path, 89 + _.get(params, "at", "/Music").replace(/\/$/, "").trim() 90 + ) 85 91 ) 86 92 ) 87 93 .orderBy(asc(tables.dropboxPaths.name))
+5 -2
apps/api/src/xrpc/app/rocksky/googledrive/getFiles.ts
··· 66 66 .where( 67 67 and( 68 68 eq(tables.users.did, did), 69 - eq(parentAlias.path, _.get(params, "at", "/Music")) 69 + eq( 70 + parentAlias.path, 71 + _.get(params, "at", "/Music").replace(/\/$/, "").trim() 72 + ) 70 73 ) 71 74 ) 72 75 .orderBy(asc(tables.googleDriveDirectories.name)) ··· 94 97 eq(tables.users.did, did), 95 98 eq( 96 99 tables.googleDriveDirectories.path, 97 - _.get(params, "at", "/Music") 100 + _.get(params, "at", "/Music").replace(/\/$/, "").trim() 98 101 ) 99 102 ) 100 103 )