feat(status): add estimate customer actions
This commit is contained in:
parent
efdc4d5be1
commit
6f6891134e
9 changed files with 699 additions and 3 deletions
15
app/api/status/[token]/estimate/approve/route.ts
Normal file
15
app/api/status/[token]/estimate/approve/route.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { submitOlympusEstimateAction } from "@/lib/olympus/status";
|
||||
import { estimateActionResponse } from "../action-response";
|
||||
|
||||
type RouteContext = {
|
||||
params: Promise<{
|
||||
token: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export async function POST(_request: Request, { params }: RouteContext) {
|
||||
const { token } = await params;
|
||||
const result = await submitOlympusEstimateAction(token, "approve");
|
||||
|
||||
return estimateActionResponse(result, "Kostenvoranschlag wurde freigegeben.");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue