mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
Co-authored-by: alishaz-polymath <[email protected]> Co-authored-by: Syed Ali Shahbaz <[email protected]>
23 lines
503 B
TypeScript
23 lines
503 B
TypeScript
import { prisma } from "@calcom/prisma";
|
|
|
|
import type { TSubmitRatingInputSchema } from "./submitRating.schema";
|
|
|
|
type SubmitRatingOptions = {
|
|
input: TSubmitRatingInputSchema;
|
|
};
|
|
|
|
export const submitRatingHandler = async ({ input }: SubmitRatingOptions) => {
|
|
const { bookingUid, rating, comment } = input;
|
|
await prisma.booking.update({
|
|
where: {
|
|
uid: bookingUid,
|
|
},
|
|
data: {
|
|
rating: rating,
|
|
ratingFeedback: comment,
|
|
},
|
|
});
|
|
};
|
|
|
|
export default submitRatingHandler;
|