mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: type error
This commit is contained in:
parent
53f83f78c7
commit
7e4e6635ad
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ import { errorJson } from '@/utils/log.ts';
|
||||||
import { getAmount } from '@/utils/bolt11.ts';
|
import { getAmount } from '@/utils/bolt11.ts';
|
||||||
import { organizeProofs, validateAndParseWallet } from '@/utils/cashu.ts';
|
import { organizeProofs, validateAndParseWallet } from '@/utils/cashu.ts';
|
||||||
import { tokenEventSchema } from '@/schemas/cashu.ts';
|
import { tokenEventSchema } from '@/schemas/cashu.ts';
|
||||||
|
import { DittoEvent } from '@/interfaces/DittoEvent.ts';
|
||||||
|
|
||||||
type Wallet = z.infer<typeof walletSchema>;
|
type Wallet = z.infer<typeof walletSchema>;
|
||||||
|
|
||||||
|
|
@ -317,7 +318,7 @@ route.post('/nutzap', userMiddleware({ enc: 'nip44' }), async (c) => {
|
||||||
await hydrateEvents({ ...c.var, events: [event] });
|
await hydrateEvents({ ...c.var, events: [event] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.kind === 1 && (event.author?.pubkey !== account_id)) {
|
if (event.kind === 1 && ((event as DittoEvent)?.author?.pubkey !== account_id)) {
|
||||||
return c.json({ error: 'Post author does not match author' }, 422);
|
return c.json({ error: 'Post author does not match author' }, 422);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue