feat: add appointment notification sharing functionality via WhatsApp, email, and system clipboard
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
AppointmentAdminByDateView,
|
||||
CreateAppointmentParams,
|
||||
CreateImmediateAppointmentNotificationJobsParams,
|
||||
AppointmentNotificationPreviewParams,
|
||||
AppointmentNotificationPreviewResult,
|
||||
DeleteAppointmentParams,
|
||||
FindAppointmentsParams,
|
||||
FindAppointmentSchedulesParams,
|
||||
@@ -368,6 +370,27 @@ export class CreateImmediateAppointmentNotificationJobsController extends Contro
|
||||
}
|
||||
}
|
||||
|
||||
@Route("appointments/notification-preview")
|
||||
@Middlewares(authenticateMiddleware)
|
||||
export class AppointmentNotificationPreviewController extends Controller {
|
||||
@Response<ApiValidationError>(500, "Ha ocurrido un error")
|
||||
@SuccessResponse(200, "Done")
|
||||
@Post()
|
||||
public async getAppointmentNotificationPreview(
|
||||
@Body() requestBody: AppointmentNotificationPreviewParams
|
||||
): Promise<AppointmentNotificationPreviewResult | ApiValidationError> {
|
||||
try {
|
||||
const preview = await new AppointmentService().getAppointmentNotificationPreview(requestBody);
|
||||
this.setStatus(200);
|
||||
return preview;
|
||||
} catch (e) {
|
||||
const errorOccurred: Error = e as Error; console.error("GET EVENT ERROR:", errorOccurred);
|
||||
this.setStatus(500);
|
||||
return new ApiValidationError(500, errorOccurred.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Route("appointments/apply-discount")
|
||||
@Middlewares(authenticateMiddleware)
|
||||
export class ApplyAppointmentDiscountContrnoller extends Controller {
|
||||
|
||||
Reference in New Issue
Block a user