mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: get first event from query
This commit is contained in:
parent
d5ff66a542
commit
d19b925db0
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ export const createCashuWalletController: AppController = async (c) => {
|
||||||
return c.json({ error: 'Bad request', schema: result.error }, 400);
|
return c.json({ error: 'Bad request', schema: result.error }, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
const event = await store.query([{ authors: [pubkey], kinds: [37375] }], { signal });
|
const [event] = await store.query([{ authors: [pubkey], kinds: [37375] }], { signal });
|
||||||
if (event) {
|
if (event) {
|
||||||
return c.json({ error: 'You already have a wallet 😏', schema: result.error }, 400);
|
return c.json({ error: 'You already have a wallet 😏', schema: result.error }, 400);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue