Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leo3friedman committed May 2, 2024
1 parent 5bc134e commit 9840e7d
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 98 deletions.
2 changes: 1 addition & 1 deletion backend/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cookieParser from "cookie-parser";
import express from "express";
import dotenv from "dotenv";
import express from "express";

import fileRoutes from "./src/routes/fileRoutes";
import loginRoutes from "./src/routes/loginRoutes";
Expand Down
163 changes: 72 additions & 91 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions backend/src/routes/loginRoutes.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import cors from "cors";
import express, { Request, Response, Router } from "express";
import dotenv from "dotenv";
import express, { Request, Response, Router } from "express";

dotenv.config();

const router: Router = express.Router();
const corsOptions = {
origin: JSON.parse(process.env.LOGIN_ORIGINS ?? "[]"),
origin: JSON.parse(process.env.LOGIN_ORIGINS ?? "[]") as string[],
credentials: true,
};

Expand Down
8 changes: 4 additions & 4 deletions frontend/src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const initialState: AuthState = {
logout: () => undefined,
};

const SERVER_URL = import.meta.env.VITE_SERVER_URL;
const SERVER_URL = import.meta.env.VITE_SERVER_URL as string;
const ENDPOINTS = {
LOGIN: import.meta.env.VITE_SERVER_LOGIN_ENDPOINT,
LOGOUT: import.meta.env.VITE_SERVER_LOGOUT_ENDPOINT,
VALIDATE: import.meta.env.VITE_SERVER_VALIDATE_ENDPOINT,
LOGIN: import.meta.env.VITE_SERVER_LOGIN_ENDPOINT as string,
LOGOUT: import.meta.env.VITE_SERVER_LOGOUT_ENDPOINT as string,
VALIDATE: import.meta.env.VITE_SERVER_VALIDATE_ENDPOINT as string,
};

export const AuthContext = createContext<AuthState>(initialState);
Expand Down

0 comments on commit 9840e7d

Please sign in to comment.