grasp: repository path uses the pubkey now.

This commit is contained in:
fiatjaf
2025-12-01 10:03:01 -03:00
parent 020e4a8f56
commit fb1603e062
4 changed files with 8 additions and 6 deletions
+5
View File
@@ -7,6 +7,7 @@ import (
"fmt"
"io"
"net/http"
"path/filepath"
"slices"
"strings"
@@ -142,6 +143,10 @@ func (gs *GraspServer) validatePush(
return nil
}
func (gs *GraspServer) getRepositoryPath(pubkey nostr.PubKey, repoName string) string {
return filepath.Join(gs.RepositoryDir, pubkey.Hex(), repoName)
}
// repoExists checks if a repository has an announcement event (kind 30617)
func (gs *GraspServer) repoExists(pubkey nostr.PubKey, repoName string) bool {
for range gs.Relay.QueryStored(context.Background(), nostr.Filter{