From 9010078489eae77c620a3bf4802ff6b417ea31f9 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 7 Sep 2022 16:00:25 -0500 Subject: Add EditProfile modal --- src/state/lib/api.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/state/lib/api.ts') 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, -- cgit 1.4.1