fix: sign-event api working

This commit is contained in:
MTG2000
2022-07-20 19:41:30 +03:00
parent 263e8c410d
commit 41b8ff40c6
4 changed files with 11 additions and 12 deletions

View File

@@ -9,7 +9,6 @@ const { prisma } = require('../../prisma');
const signEvent = async (req, res) => {
console.log(req.body);
try {
const userPubKey = await extractKeyFromCookie(req.headers.cookie ?? req.headers.Cookie)
const user = await getUserByPubKey(userPubKey);
@@ -40,13 +39,11 @@ const signEvent = async (req, res) => {
pubkey,
content,
tags,
created_at: Date.now(),
created_at: Math.round(Date.now() / 1000),
}
event.sig = await signNostrEvent(event, prvkey);
console.log(event);
return res
.status(200)
.json({ event });