feat: add MIN_ADDRESS_LEN && MAX_ADDRESS_LEN (#304)

This commit is contained in:
Dream Hunter
2024-06-06 21:44:22 +08:00
committed by GitHub
parent 6225f6521a
commit 0db611bb3e
11 changed files with 50 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ api.post('/admin/new_address', async (c) => {
return c.text("Please provide a name", 400)
}
try {
const res = await newAddress(c, name, domain, enablePrefix);
const res = await newAddress(c, name, domain, enablePrefix, false);
return c.json(res);
} catch (e) {
return c.text(`Failed create address: ${(e as Error).message}`, 400)