diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-09-07 16:00:25 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-09-07 16:00:25 -0500 |
commit | 9010078489eae77c620a3bf4802ff6b417ea31f9 (patch) | |
tree | 11c5c03099a5cda82161d077efd3d50525dd8487 /src/state/lib/api.ts | |
parent | 5ae39612d7e8484ffc5be6c7c5dc0f878985c676 (diff) | |
download | voidsky-9010078489eae77c620a3bf4802ff6b417ea31f9.tar.zst |
Add EditProfile modal
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, |