Skip to content

Commit

Permalink
refactor(web): lint-functions-code
Browse files Browse the repository at this point in the history
  • Loading branch information
Harman-singh-waraich committed May 1, 2024
1 parent 96360ec commit 45e7ee8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 0 additions & 2 deletions web/netlify/functions/authUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ const authUser = async (event) => {

const siweMessage = new SiweMessage(message);

console.log({ netlifyUri, netlifyDeployUri });

if (netlifyUri && netlifyUri !== siweMessage.uri && netlifyDeployUri && netlifyDeployUri !== siweMessage.uri) {
console.debug(`Invalid URI: expected ${netlifyUri} but got ${siweMessage.uri}`);
throw new Error(`Invalid URI`);
Expand Down
3 changes: 2 additions & 1 deletion web/netlify/functions/fetch-settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import middy from "@middy/core";
import { createClient } from "@supabase/supabase-js";

import { Database } from "../../src/types/supabase-notification";
import middy from "@middy/core";
import { authMiddleware } from "../middleware/authMiddleware";

const fetchSettings = async (event) => {
Expand Down
6 changes: 4 additions & 2 deletions web/netlify/functions/getNonce.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { createClient } from "@supabase/supabase-js";
import { Database } from "../../src/types/supabase-notification";
import middy from "@middy/core";
import { createClient } from "@supabase/supabase-js";
import { generateNonce } from "siwe";

import { ETH_ADDRESS_REGEX } from "src/consts";

import { Database } from "../../src/types/supabase-notification";

const getNonce = async (event) => {
try {
const { queryStringParameters } = event;
Expand Down
7 changes: 4 additions & 3 deletions web/netlify/functions/update-settings.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createClient } from "@supabase/supabase-js";
import { Database } from "../../src/types/supabase-notification";
import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index";
import middy from "@middy/core";
import jsonBodyParser from "@middy/http-json-body-parser";
import { createClient } from "@supabase/supabase-js";

import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index";
import { Database } from "../../src/types/supabase-notification";
import { authMiddleware } from "../middleware/authMiddleware";

type NotificationSettings = {
Expand Down

0 comments on commit 45e7ee8

Please sign in to comment.