- migrate biome.json to schema 2.5.10 (preset instead of recommended) - apply safe fixes: formatting, import organization, unused imports/vars - use node:crypto import protocol - drop unused catch bindings - a11y: associate labels with controls via htmlFor/id (add optional id to DatePicker), hide decorative SVGs from AT, and replace the custom role="checkbox" button with a native checkbox input - remove unnecessary pageSize dependency from useMemo
11 lines
370 B
TypeScript
11 lines
370 B
TypeScript
import type { Context } from "hono";
|
|
import { adjustBalance, adjustBalanceSchema } from "../wallets.service";
|
|
|
|
export async function adjustBalanceHandler(c: Context) {
|
|
const id = Number(c.req.param("id"));
|
|
const body = await c.req.json();
|
|
const parsed = adjustBalanceSchema.parse(body);
|
|
const result = await adjustBalance(id, parsed);
|
|
return c.json(result);
|
|
}
|