diff options
Diffstat (limited to 'src/state/lib/api.ts')
-rw-r--r-- | src/state/lib/api.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/state/lib/api.ts b/src/state/lib/api.ts index 64a88cdec..3324525bf 100644 --- a/src/state/lib/api.ts +++ b/src/state/lib/api.ts @@ -124,6 +124,17 @@ export async function unfollow( return numDels > 0 } +export async function updateProfile( + adx: AdxClient, + user: string, + profile: bsky.Profile.Record, +) { + return await adx + .repo(user, true) + .collection('blueskyweb.xyz:Profiles') + .put('Profile', 'profile', {$type: 'blueskyweb.xyz:Profile', ...profile}) +} + type WherePred = (_record: GetRecordResponseValidated) => Boolean async function deleteWhere( coll: AdxRepoCollectionClient, |