mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-26 11:37:40 +02:00
fix NIP-98 token
This commit is contained in:
@@ -81,8 +81,8 @@ export default function PostModal({
|
||||
const content = getValues().content;
|
||||
const position = textAreaRef.current?.getCaretPosition();
|
||||
if (position !== undefined) {
|
||||
setValue("content", content.slice(0, position) + imageUrl + content.slice(position));
|
||||
} else setValue("content", content + imageUrl);
|
||||
setValue("content", content.slice(0, position) + imageUrl + " " + content.slice(position));
|
||||
} else setValue("content", content + imageUrl + " ");
|
||||
} catch (e) {
|
||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ export async function nostrBuildUploadImage(image: File, sign?: (draft: DraftNos
|
||||
const headers: HeadersInit = {};
|
||||
if (sign) {
|
||||
// @ts-ignore
|
||||
const token = await nip98.getToken(url, "post", sign, true);
|
||||
const token = await nip98.getToken(url, "POST", sign, true);
|
||||
headers.Authorization = token;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user