tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
[api] trim directory path
tsiry-sandratraina.com
8 months ago
3adf3300
c07254fe
+13
-4
2 changed files
expand all
collapse all
unified
split
apps
api
src
xrpc
app
rocksky
dropbox
getFiles.ts
googledrive
getFiles.ts
+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
64
-
eq(parentAlias.path, _.get(params, "at", "/Music"))
64
64
+
eq(
65
65
+
parentAlias.path,
66
66
+
_.get(params, "at", "/Music").replace(/\/$/, "").trim()
67
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
84
-
eq(tables.dropboxDirectories.path, _.get(params, "at", "/Music"))
87
87
+
eq(
88
88
+
tables.dropboxDirectories.path,
89
89
+
_.get(params, "at", "/Music").replace(/\/$/, "").trim()
90
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
69
-
eq(parentAlias.path, _.get(params, "at", "/Music"))
69
69
+
eq(
70
70
+
parentAlias.path,
71
71
+
_.get(params, "at", "/Music").replace(/\/$/, "").trim()
72
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
97
-
_.get(params, "at", "/Music")
100
100
+
_.get(params, "at", "/Music").replace(/\/$/, "").trim()
98
101
)
99
102
)
100
103
)