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

update getProfile xrpc method

+16 -3
+16 -3
apps/api/src/xrpc/app/rocksky/actor/getProfile.ts
··· 9 9 import { QueryParams } from "lexicon/types/app/rocksky/actor/getProfile"; 10 10 import { createAgent } from "lib/agent"; 11 11 import _ from "lodash"; 12 + import R from "ramda"; 12 13 import tables from "schema"; 13 14 import { SelectDropboxAccounts } from "schema/dropbox-accounts"; 14 15 import { SelectGoogleDriveAccounts } from "schema/google-drive-accounts"; ··· 292 293 createdAt: profile.user?.createdAt.toISOString(), 293 294 updatedAt: profile.user?.updatedAt.toISOString(), 294 295 spotifyUser, 295 - spotifyToken, 296 + spotifyToken: { 297 + ...R.omit(["accessToken", "refreshToken"], spotifyToken), 298 + createdAt: spotifyToken?.createdAt.toISOString(), 299 + updatedAt: spotifyToken?.updatedAt.toISOString(), 300 + }, 296 301 spotifyConnected: !!spotifyToken, 297 - googledrive, 298 - dropbox, 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 + }, 299 312 })); 300 313 }; 301 314