work-in-progress atproto PDS
typescript atproto pds atcute
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: nit

Mary 26dd4f00 fcfe01fe

+2 -2
+2 -2
packages/danaus/src/api/com.atproto/repo.putRecord.ts
··· 34 34 throw new AuthRequiredError({ error: 'InvalidToken', description: `invalid repository credentials` }); 35 35 } 36 36 37 - const uri = `at://${account.did}/${input.collection}/${input.rkey}` as CanonicalResourceUri; 38 - 39 37 // validate before transaction (validation doesn't depend on create vs update) 40 38 const writes: RepoWriteOp[] = [ 41 39 { ··· 51 49 52 50 // check if record exists and write in same transaction (upsert behavior) 53 51 const result = await actorManager.transact(account.did, (store) => { 52 + const uri: CanonicalResourceUri = `at://${account.did}/${input.collection}/${input.rkey}`; 53 + 54 54 const exists = store.record.getRecord(uri) !== null; 55 55 const action = exists ? 'update' : 'create'; 56 56