The road to zero TypeScript errors (#1756)

* Type fixes

* Type fixes

* Type fixes

* Type fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Omar López
2022-02-10 10:44:46 +00:00
committed by GitHub
co-authored by kodiakhq[bot]
parent 798930bf23
commit 5d0ba3dafc
14 changed files with 54 additions and 53 deletions
+8
View File
@@ -6,6 +6,7 @@ import { WEBHOOK_TRIGGER_EVENTS } from "@lib/webhooks/constants";
import sendPayload from "@lib/webhooks/sendPayload";
import { createProtectedRouter } from "@server/createRouter";
import { getTranslation } from "@server/lib/i18n";
export const webhookRouter = createProtectedRouter()
.query("list", {
@@ -94,6 +95,11 @@ export const webhookRouter = createProtectedRouter()
}),
async resolve({ input }) {
const { url, type, payloadTemplate } = input;
const translation = await getTranslation("en", "common");
const language = {
locale: "en",
translate: translation,
};
const data = {
type: "Test",
@@ -106,12 +112,14 @@ export const webhookRouter = createProtectedRouter()
email: "jdoe@example.com",
name: "John Doe",
timeZone: "Europe/London",
language,
},
],
organizer: {
name: "Cal",
email: "",
timeZone: "Europe/London",
language,
},
};