fix: update api endpoint for test onion tls script

This commit is contained in:
Iain Learmonth 2024-12-06 14:48:28 +00:00
parent 061705a5e4
commit 41fc0a73a5

View file

@ -1,14 +1,6 @@
import os
import shutil
import subprocess
import base64
import json
from cryptography import x509
from cryptography.x509.oid import NameOID
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.hashes import SHA256
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
import os
from datetime import datetime, timedelta, timezone
from tests.api.test_onion import generate_onion_keys_with_mkp224o, generate_self_signed_tls_certificate
@ -42,7 +34,7 @@ def generate_create_rest_payload(parent_folder: str, folder_name: str):
with open(rest_file_path, "a") as f:
f.write(f"### Create Onion Service ({folder_name})\n")
f.write("POST http://localhost:5000/api/web/onion\n")
f.write("POST http://localhost:5000/api/onion/onion\n")
f.write("Content-Type: application/json\n\n")
json.dump(payload, f, indent=4)
f.write("\n\n")