v0.0.14 - Still working on commenting out old code and deleting
This commit is contained in:
@@ -83,12 +83,14 @@ generate_admin_keys() {
|
||||
|
||||
create_admin_event() {
|
||||
local method="$1"
|
||||
local endpoint="$2"
|
||||
local content="admin_request"
|
||||
local expiration=$(($(date +%s) + 3600)) # 1 hour from now
|
||||
|
||||
# Create Nostr event with nak - always use "admin" tag for admin operations
|
||||
local event=$(nak event -k 24242 -c "$content" \
|
||||
--tag t="admin" \
|
||||
# Create Nostr event with nak - use kind 33335 for admin/configuration events
|
||||
local event=$(nak event -k 33335 -c "$content" \
|
||||
--tag method="$method" \
|
||||
--tag endpoint="$endpoint" \
|
||||
--tag expiration="$expiration" \
|
||||
--sec "$ADMIN_PRIVKEY")
|
||||
|
||||
@@ -102,8 +104,8 @@ send_admin_request() {
|
||||
|
||||
log_info "Testing $method $endpoint"
|
||||
|
||||
# Create authenticated Nostr event
|
||||
local event=$(create_admin_event "$method")
|
||||
# Create authenticated Nostr event with method and endpoint
|
||||
local event=$(create_admin_event "$method" "$endpoint")
|
||||
local auth_header="Nostr $(echo "$event" | base64 -w 0)"
|
||||
|
||||
# Send request with curl
|
||||
|
||||
Reference in New Issue
Block a user