Skip to content

Commit

Permalink
ts
Browse files Browse the repository at this point in the history
  • Loading branch information
curly210102 committed Nov 4, 2021
1 parent cbfe4fd commit b78516a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/api/contact.js → pages/api/contact.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const { join, resolve } = require("path");
const { readFileSync } = require("fs");
import type { NextApiRequest, NextApiResponse } from "next";

export default async (req, res) => {
export default async (req: NextApiRequest, res: NextApiResponse) => {
const { slug } = req.query;
const templateDirectory = resolve(process.cwd(), "email");
const emailTemplate = readFileSync(
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"functions": {
"pages/api/contact.js": {
"pages/api/contact.ts": {
"includeFiles": "email/**/template.mjml"
}
}
Expand Down

0 comments on commit b78516a

Please sign in to comment.