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