update post-note.ts
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env runts -- --allow-env --allow-import --allow-net
|
||||
|
||||
import { parseArgs } from "jsr:@std/cli/parse-args";
|
||||
import { encryptEcdhP256 } from "https://global.hatter.ink/script/get/@0/deno-wrapkey-mod.ts";
|
||||
import { log } from "https://global.hatter.ink/script/get/@1/deno-commons-mod.ts";
|
||||
import { fetchWithTimoutAndAutoProxy } from "https://global.hatter.ink/script/get/@0/deno-fetch-auto-proxy-mod.ts";
|
||||
import {parseArgs} from "jsr:@std/cli/parse-args";
|
||||
import {encryptEcdhP256} from "https://global.hatter.ink/script/get/@0/deno-wrapkey-mod.ts";
|
||||
import {log} from "https://global.hatter.ink/script/get/@1/deno-commons-mod.ts";
|
||||
import {fetchWithTimeoutAndAutoProxy} from "https://global.hatter.ink/script/get/@1/deno-fetch-auto-proxy-mod.ts";
|
||||
|
||||
const endpoint = Deno.env.get("POST_ENCRYPTED_NOTE_ENDPOINT");
|
||||
const publicKeyPointHex = Deno.env.get("ENCRYPTION_PUBLIC_KEY_POINT_HEX");
|
||||
@@ -54,11 +54,11 @@ if (flags["post-message"]) {
|
||||
args.push("postMessage=true");
|
||||
}
|
||||
|
||||
const response = await fetchWithTimoutAndAutoProxy(
|
||||
const response = await fetchWithTimeoutAndAutoProxy(
|
||||
`${endpoint}?${args.join("&")}`,
|
||||
);
|
||||
|
||||
console.info(response.status, await response.json());
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250705T082352+08:00.MEUCIQCXIiNRCQYEV3S5tDmu
|
||||
// j/1mMjlNjHne9gWjxNJuJuz8pQIgNtTvQ4XwngDgNSAGYCUDCgB7abitnVUsG+NRVwJJurw=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260127T224542+08:00.MEUCIQDg4zKtOOdd95j7LqzA
|
||||
// kNqHczlfJblEWj3Q6WE3RxzxKQIgJuopk5tUHS9Iyx/Sd85R+SbPA3axAaP8TVVMCZlFZso=
|
||||
|
||||
Reference in New Issue
Block a user