Skip to main content

Function: deleteRecord()

deleteRecord(agent, uri): Promise<void>

Defined in: web/lib/atproto/record-creator.ts:947

Delete a record from the user's PDS.

Parameters​

agent​

Agent

Authenticated ATProto Agent

uri​

string

AT-URI of the record to delete

Returns​

Promise<void>

Promise that resolves when deletion is complete

Remarks​

Users can delete their own records. This removes the record from their PDS. Chive will process the deletion from the firehose and update its index.

Throws​

Error if agent is not authenticated

Throws​

Error if record doesn't belong to user

Throws​

Error if deletion fails

Example​

await deleteRecord(agent, 'at://did:plc:abc/pub.chive.eprint.submission/123');