tangled
alpha
login
or
join now
tsiry-sandratraina.com
/
rocksky
forked from
rocksky.app/rocksky
3
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
3
fork
atom
overview
issues
1
pulls
pipelines
Append Z to createdAt date in API
tsiry-sandratraina.com
1 month ago
20196d38
d0ff284d
+12
-2
2 changed files
expand all
collapse all
unified
split
apps
api
src
xrpc
app
rocksky
actor
getActorScrobbles.ts
getActorSongs.ts
+6
-1
apps/api/src/xrpc/app/rocksky/actor/getActorScrobbles.ts
···
55
55
}: {
56
56
data: Scrobble[];
57
57
}): Effect.Effect<{ scrobbles: ScrobbleViewBasic[] }, never> => {
58
58
-
return Effect.sync(() => ({ scrobbles: deepCamelCaseKeys(data) }));
58
58
+
return Effect.sync(() => ({
59
59
+
scrobbles: deepCamelCaseKeys(data).map((x: ScrobbleViewBasic) => ({
60
60
+
...x,
61
61
+
createdAt: `${x.createdAt}Z`,
62
62
+
})),
63
63
+
}));
59
64
};
60
65
61
66
type Scrobble = {
+6
-1
apps/api/src/xrpc/app/rocksky/actor/getActorSongs.ts
···
57
57
}: {
58
58
data: Track[];
59
59
}): Effect.Effect<{ tracks: SongViewBasic[] }, never> => {
60
60
-
return Effect.sync(() => ({ tracks: deepCamelCaseKeys(data) }));
60
60
+
return Effect.sync(() => ({
61
61
+
tracks: deepCamelCaseKeys(data).map((x: SongViewBasic) => ({
62
62
+
...x,
63
63
+
createdAt: `${x.createdAt}Z`,
64
64
+
})),
65
65
+
}));
61
66
};
62
67
63
68
type Track = {