Phase2: Invoicecomputation/AdminpricingUI/Ainvoicemgnt
All checks were successful
Build and Push / build (push) Successful in 1m34s
All checks were successful
Build and Push / build (push) Successful in 1m34s
This commit is contained in:
@@ -24,6 +24,9 @@ import { safeError } from "@/lib/errors";
|
||||
const upsertSchema = z.object({
|
||||
skillId: z.string().min(1).max(100),
|
||||
dailyPriceChf: z.number().min(0).max(1_000_000),
|
||||
// Optional with default 0 so existing API callers keep working.
|
||||
// Setup fee fires once per (tenant, skill); see billing.ts.
|
||||
setupFeeChf: z.number().min(0).max(1_000_000).optional().default(0),
|
||||
});
|
||||
|
||||
export async function GET() {
|
||||
@@ -63,7 +66,8 @@ export async function PUT(request: Request) {
|
||||
try {
|
||||
const row = await setSkillPricing(
|
||||
parsed.data.skillId,
|
||||
parsed.data.dailyPriceChf
|
||||
parsed.data.dailyPriceChf,
|
||||
parsed.data.setupFeeChf
|
||||
);
|
||||
return NextResponse.json(row);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user