mirror of
https://github.com/kind-0/nsecbunkerd.git
synced 2026-04-03 06:51:17 +00:00
fix: Convert policyId to integer in create_new_token
The policyId parameter comes as a string from NIP-46 RPC params but Prisma expects an integer for the Token.policyId field. Added parseInt() to convert the string to integer before passing to prisma.token.create(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a23c6bc932
commit
539106c4f1
@ -15,7 +15,7 @@ export default async function createNewToken(admin: AdminInterface, req: NDKRpcR
|
||||
|
||||
const token = [...Array(64)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
|
||||
const data: any = {
|
||||
keyName, clientName, policyId,
|
||||
keyName, clientName, policyId: parseInt(policyId),
|
||||
createdBy: req.pubkey,
|
||||
token
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user