tangled
alpha
login
or
join now
rocksky.app
/
rocksky
96
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
96
fork
atom
overview
issues
7
pulls
pipelines
update getProfile xrpc method
tsiry-sandratraina.com
8 months ago
63d24d7a
552a5de5
+16
-3
1 changed file
expand all
collapse all
unified
split
apps
api
src
xrpc
app
rocksky
actor
getProfile.ts
+16
-3
apps/api/src/xrpc/app/rocksky/actor/getProfile.ts
···
9
import { QueryParams } from "lexicon/types/app/rocksky/actor/getProfile";
10
import { createAgent } from "lib/agent";
11
import _ from "lodash";
0
12
import tables from "schema";
13
import { SelectDropboxAccounts } from "schema/dropbox-accounts";
14
import { SelectGoogleDriveAccounts } from "schema/google-drive-accounts";
···
292
createdAt: profile.user?.createdAt.toISOString(),
293
updatedAt: profile.user?.updatedAt.toISOString(),
294
spotifyUser,
295
-
spotifyToken,
0
0
0
0
296
spotifyConnected: !!spotifyToken,
297
-
googledrive,
298
-
dropbox,
0
0
0
0
0
0
0
0
299
}));
300
};
301
···
9
import { QueryParams } from "lexicon/types/app/rocksky/actor/getProfile";
10
import { createAgent } from "lib/agent";
11
import _ from "lodash";
12
+
import R from "ramda";
13
import tables from "schema";
14
import { SelectDropboxAccounts } from "schema/dropbox-accounts";
15
import { SelectGoogleDriveAccounts } from "schema/google-drive-accounts";
···
293
createdAt: profile.user?.createdAt.toISOString(),
294
updatedAt: profile.user?.updatedAt.toISOString(),
295
spotifyUser,
296
+
spotifyToken: {
297
+
...R.omit(["accessToken", "refreshToken"], spotifyToken),
298
+
createdAt: spotifyToken?.createdAt.toISOString(),
299
+
updatedAt: spotifyToken?.updatedAt.toISOString(),
300
+
},
301
spotifyConnected: !!spotifyToken,
302
+
googledrive: {
303
+
...googledrive,
304
+
createdAt: googledrive?.createdAt.toISOString(),
305
+
updatedAt: googledrive?.updatedAt.toISOString(),
306
+
},
307
+
dropbox: {
308
+
...dropbox,
309
+
createdAt: dropbox?.createdAt.toISOString(),
310
+
updatedAt: dropbox?.updatedAt.toISOString(),
311
+
},
312
}));
313
};
314