use put helper method

This commit is contained in:
Samuel Newman
2025-06-27 15:00:55 +03:00
parent 6f3ac6e333
commit ade35dd23b
3 changed files with 35 additions and 34 deletions
+6 -5
View File
@@ -44,12 +44,13 @@ export function useNotificationDeclarationMutation() {
const queryClient = useQueryClient()
return useMutation({
mutationFn: async (record: AppBskyNotificationDeclaration.Record) => {
const response = await agent.com.atproto.repo.putRecord({
repo: currentAccount!.did,
collection: 'app.bsky.notification.declaration',
rkey: 'self',
const response = await agent.app.bsky.notification.declaration.put(
{
repo: currentAccount!.did,
rkey: 'self',
},
record,
})
)
return response
},
onMutate: value => {