OAuth: don't decode bech32 string
This commit is contained in:
parent
8c48b9f625
commit
b33a3a21fc
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue