Skip to content

Commit

Permalink
fix: middy import
Browse files Browse the repository at this point in the history
  • Loading branch information
yanlow committed Dec 22, 2023
1 parent 0a2edbe commit bcf7def
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"prefer-regex-literals": "off",
"func-names": ["error", "as-needed"],
"prettier/prettier": "error",
"no-unused-expressions": "off"
"no-unused-expressions": "off",
"import/no-import-module-exports": "off"
}
}
5 changes: 3 additions & 2 deletions src/email/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const middy = require("@middy/core");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { get } = require("lodash");
const cors = require("@middy/http-cors");
const { isValid, verify } = require("@govtechsg/opencerts-verify");

const recaptcha = require("./recaptcha");
Expand Down
5 changes: 3 additions & 2 deletions src/storage/create.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const middy = require("@middy/core");
const cors = require("@middy/http-cors");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { uploadDocument } = require("./documentService");

const handleCreate = async (event) => {
Expand Down
5 changes: 3 additions & 2 deletions src/storage/createAtId.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const middy = require("@middy/core");
const cors = require("@middy/http-cors");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { uploadDocumentAtId } = require("./documentService");

const handleCreateAtId = async (event) => {
Expand Down
5 changes: 3 additions & 2 deletions src/storage/get.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const middy = require("@middy/core");
const cors = require("@middy/http-cors");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { getDocument } = require("./documentService");

const handleGet = async (event) => {
Expand Down
5 changes: 3 additions & 2 deletions src/storage/queueNumber.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const middy = require("@middy/core");
const cors = require("@middy/http-cors");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { getQueueNumber } = require("./documentService");

const handleQueueNumber = async () => {
Expand Down
5 changes: 3 additions & 2 deletions src/verify/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const middy = require("@middy/core");
const cors = require("@middy/http-cors");
import middy from "@middy/core";
import cors from "@middy/http-cors";

const { verify, isValid } = require("@govtechsg/opencerts-verify");
const config = require("./config");

Expand Down

0 comments on commit bcf7def

Please sign in to comment.