Merge branch 'main' into feishu-redux
This commit is contained in:
commit
6bdb5798c5
|
@ -33,7 +33,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
|
||||||
* type: boolean
|
* type: boolean
|
||||||
* description: Delete all remaining bookings
|
* description: Delete all remaining bookings
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: reason
|
* name: cancellationReason
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
|
|
|
@ -69,7 +69,12 @@ import { schemaWebhookEditBodyParams, schemaWebhookReadPublic } from "~/lib/vali
|
||||||
export async function patchHandler(req: NextApiRequest) {
|
export async function patchHandler(req: NextApiRequest) {
|
||||||
const { prisma, query, userId, isAdmin } = req;
|
const { prisma, query, userId, isAdmin } = req;
|
||||||
const { id } = schemaQueryIdAsString.parse(query);
|
const { id } = schemaQueryIdAsString.parse(query);
|
||||||
const { eventTypeId, userId: bodyUserId, ...data } = schemaWebhookEditBodyParams.parse(req.body);
|
const {
|
||||||
|
eventTypeId,
|
||||||
|
userId: bodyUserId,
|
||||||
|
eventTriggers,
|
||||||
|
...data
|
||||||
|
} = schemaWebhookEditBodyParams.parse(req.body);
|
||||||
const args: Prisma.WebhookUpdateArgs = { where: { id }, data };
|
const args: Prisma.WebhookUpdateArgs = { where: { id }, data };
|
||||||
|
|
||||||
if (eventTypeId) {
|
if (eventTypeId) {
|
||||||
|
@ -88,7 +93,8 @@ export async function patchHandler(req: NextApiRequest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.data.eventTriggers) {
|
if (args.data.eventTriggers) {
|
||||||
args.data.eventTriggers = [...new Set(args.data.eventTriggers)];
|
const eventTriggersSet = new Set(eventTriggers);
|
||||||
|
args.data.eventTriggers = Array.from(eventTriggersSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await prisma.webhook.update(args);
|
const result = await prisma.webhook.update(args);
|
||||||
|
|
|
@ -66,7 +66,12 @@ import { schemaWebhookCreateBodyParams, schemaWebhookReadPublic } from "~/lib/va
|
||||||
*/
|
*/
|
||||||
async function postHandler(req: NextApiRequest) {
|
async function postHandler(req: NextApiRequest) {
|
||||||
const { userId, isAdmin, prisma } = req;
|
const { userId, isAdmin, prisma } = req;
|
||||||
const { eventTypeId, userId: bodyUserId, ...body } = schemaWebhookCreateBodyParams.parse(req.body);
|
const {
|
||||||
|
eventTypeId,
|
||||||
|
userId: bodyUserId,
|
||||||
|
eventTriggers,
|
||||||
|
...body
|
||||||
|
} = schemaWebhookCreateBodyParams.parse(req.body);
|
||||||
const args: Prisma.WebhookCreateArgs = { data: { id: uuidv4(), ...body } };
|
const args: Prisma.WebhookCreateArgs = { data: { id: uuidv4(), ...body } };
|
||||||
|
|
||||||
// If no event type, we assume is for the current user. If admin we run more checks below...
|
// If no event type, we assume is for the current user. If admin we run more checks below...
|
||||||
|
@ -88,7 +93,8 @@ async function postHandler(req: NextApiRequest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.data.eventTriggers) {
|
if (args.data.eventTriggers) {
|
||||||
args.data.eventTriggers = [...new Set(args.data.eventTriggers)];
|
const eventTriggersSet = new Set(eventTriggers);
|
||||||
|
args.data.eventTriggers = Array.from(eventTriggersSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await prisma.webhook.create(args);
|
const data = await prisma.webhook.create(args);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@calcom/web",
|
"name": "@calcom/web",
|
||||||
"version": "3.6.3",
|
"version": "3.6.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"analyze": "ANALYZE=true next build",
|
"analyze": "ANALYZE=true next build",
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
"a_refund_failed": "Возврат не удался",
|
"a_refund_failed": "Возврат не удался",
|
||||||
"awaiting_payment_subject": "Ожидание оплаты: {{title}} на {{date}}",
|
"awaiting_payment_subject": "Ожидание оплаты: {{title}} на {{date}}",
|
||||||
"meeting_awaiting_payment": "Ваша встреча ожидает оплаты",
|
"meeting_awaiting_payment": "Ваша встреча ожидает оплаты",
|
||||||
|
"dark_theme_contrast_error": "Темный цвет темы не проходит проверку на контрастность. Мы рекомендуем вам изменить этот цвет, чтобы ваши кнопки были более заметны.",
|
||||||
"help": "Помощь",
|
"help": "Помощь",
|
||||||
"price": "Цена",
|
"price": "Цена",
|
||||||
"paid": "Оплачено",
|
"paid": "Оплачено",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user