OAuth: don't decode bech32 string

This commit is contained in:
Alex Gleason 2023-04-29 15:33:25 -05:00
parent 8c48b9f625
commit b33a3a21fc
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 3 deletions

View File

@ -1,9 +1,7 @@
import converter from 'npm:bech32-converting';
import { validator, z } from '@/deps.ts';
const createTokenSchema = z.object({
password: z.string().transform((v) => v.startsWith('nsec1') ? converter('nsec').toHex(v).slice(2) : v),
password: z.string(),
});
const createTokenController = validator('json', (value, c) => {