diff options
author | FChannel <> | 2022-04-30 22:17:32 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 503a6637b8294aeb8e5e5546f8acbd2b3d6c4744 (patch) | |
tree | 56614d955df0d3e7284baa997bbf1a8dcc2e78f5 /activitypub/pem.go | |
parent | 1892327cee2c3fa1d3bea729bd08eb63c2189a96 (diff) |
first steps in posting connected. can make reply with no quote or quote OP
do not recommend working on this branch for the time being since
things are being moved around a lot
Diffstat (limited to 'activitypub/pem.go')
-rw-r--r-- | activitypub/pem.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/activitypub/pem.go b/activitypub/pem.go index ca6c068..ab225a9 100644 --- a/activitypub/pem.go +++ b/activitypub/pem.go @@ -139,16 +139,13 @@ func GetActorPemFromDB(pemID string) (PublicKeyPem, error) { query := `select id, owner, file from publickeypem where id=$1` - rows, err := config.DB.Query(query, pemID) - if err != nil { + if err := config.DB.QueryRow(query, pemID).Scan(&pem.Id, &pem.Owner, &pem.PublicKeyPem); err != nil { return pem, err } - defer rows.Close() - - rows.Next() - rows.Scan(&pem.Id, &pem.Owner, &pem.PublicKeyPem) - f, err := os.ReadFile(pem.PublicKeyPem) + dir, _ := os.Getwd() + dir = dir + "" + strings.Replace(pem.PublicKeyPem, ".", "", 1) + f, err := os.ReadFile(dir) if err != nil { return pem, err } |