···
// this is a bit of a pain because the golang atproto impl does not allow nil SwapRecord field
// SwapRecord is optional and should happen automagically, but given that it does not, we have to perform two requests
-
ex, err := client.RepoGetRecord(r.Context(), "", tangled.RepoNSID, user.Did, rkey)
rp.pages.Notice(w, "repo-notice", "Failed to update description, no record found on PDS.")
···
_, err = client.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
-
CreatedAt: f.Created.Format(time.RFC3339),
-
Description: &newDescription,
···
-
rkey := repoAt.RecordKey().String()
-
fail("Failed to resolve repo. Try again later", err)
newSpindle := r.FormValue("spindle")
removingSpindle := newSpindle == "[[none]]" // see pages/templates/repo/settings/pipelines.html for more info on why we use this value
client, err := rp.oauth.AuthorizedClient(r)
···
spindlePtr := &newSpindle
-
err = db.UpdateSpindle(rp.db, string(repoAt), spindlePtr)
fail("Failed to update spindle. Try again later.", err)
-
ex, err := client.RepoGetRecord(r.Context(), "", tangled.RepoNSID, user.Did, rkey)
fail("Failed to update spindle, no record found on PDS.", err)
_, err = client.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
-
CreatedAt: f.Created.Format(time.RFC3339),
-
Description: &f.Description,
···
-
err = db.AddCollaborator(rp.db, db.Collaborator{
Did: syntax.DID(currentUser.Did),
SubjectDid: collaboratorIdent.DID,
···
// create an atproto record for this fork
xrpcClient, err := rp.oauth.AuthorizedClient(r)
···
-
createdAt := time.Now().Format(time.RFC3339)
atresp, err := xrpcClient.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
l.Error("failed to write to PDS", "err", err)
···
+
newRepo.Description = newDescription
+
record := newRepo.AsRecord()
// this is a bit of a pain because the golang atproto impl does not allow nil SwapRecord field
// SwapRecord is optional and should happen automagically, but given that it does not, we have to perform two requests
+
ex, err := client.RepoGetRecord(r.Context(), "", tangled.RepoNSID, newRepo.Did, newRepo.Rkey)
rp.pages.Notice(w, "repo-notice", "Failed to update description, no record found on PDS.")
···
_, err = client.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
···
newSpindle := r.FormValue("spindle")
removingSpindle := newSpindle == "[[none]]" // see pages/templates/repo/settings/pipelines.html for more info on why we use this value
client, err := rp.oauth.AuthorizedClient(r)
···
+
newRepo.Spindle = newSpindle
+
record := newRepo.AsRecord()
spindlePtr := &newSpindle
+
err = db.UpdateSpindle(rp.db, newRepo.RepoAt().String(), spindlePtr)
fail("Failed to update spindle. Try again later.", err)
+
ex, err := client.RepoGetRecord(r.Context(), "", tangled.RepoNSID, newRepo.Did, newRepo.Rkey)
fail("Failed to update spindle, no record found on PDS.", err)
_, err = client.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
···
+
err = db.AddCollaborator(tx, db.Collaborator{
Did: syntax.DID(currentUser.Did),
SubjectDid: collaboratorIdent.DID,
···
// create an atproto record for this fork
+
Description: existingRepo.Description,
+
record := repo.AsRecord()
xrpcClient, err := rp.oauth.AuthorizedClient(r)
···
atresp, err := xrpcClient.RepoPutRecord(r.Context(), &comatproto.RepoPutRecord_Input{
Collection: tangled.RepoNSID,
Record: &lexutil.LexiconTypeDecoder{
l.Error("failed to write to PDS", "err", err)