summaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorJulien Dessaux2023-01-05 02:09:07 +0100
committerJulien Dessaux2023-01-05 02:09:07 +0100
commitd7ed1196bdd44d7734d41d91a5e72a71785e0a08 (patch)
treeaafae6571d5154dc5e9a061c8f54ca8e9b1287ad /routes
parentAdded more tests (diff)
downloadjeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.tar.gz
jeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.tar.bz2
jeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.zip
switched to single quotes string in eslint
Diffstat (limited to '')
-rw-r--r--routes/games.js20
-rw-r--r--routes/root.js22
2 files changed, 21 insertions, 21 deletions
diff --git a/routes/games.js b/routes/games.js
index 3a27cdb..5c4022c 100644
--- a/routes/games.js
+++ b/routes/games.js
@@ -1,18 +1,18 @@
-import express from "express";
+import express from 'express';
-import { gameId_get } from "../controllers/games/gameId.js";
-import { root_get, root_post } from "../controllers/games/root.js";
-import bodyParser from "../middlewares/formParser.js";
-import requireAuth from "../middlewares/requireAuth.js";
-import session from "../middlewares/sessions.js";
-import { checkName, checkUsername } from "../utils/checks.js";
+import { gameId_get } from '../controllers/games/gameId.js';
+import { root_get, root_post } from '../controllers/games/root.js';
+import bodyParser from '../middlewares/formParser.js';
+import requireAuth from '../middlewares/requireAuth.js';
+import session from '../middlewares/sessions.js';
+import { checkName, checkUsername } from '../utils/checks.js';
const router = express.Router();
router.use(session);
router.use(requireAuth);
-router.get("/", root_get);
-router.post("/", [bodyParser, checkName, checkUsername], root_post);
-router.get("/:gameId(\\d+)", gameId_get);
+router.get('/', root_get);
+router.post('/', [bodyParser, checkName, checkUsername], root_post);
+router.get('/:gameId(\\d+)', gameId_get);
export default router;
diff --git a/routes/root.js b/routes/root.js
index 863b99d..ee63748 100644
--- a/routes/root.js
+++ b/routes/root.js
@@ -1,18 +1,18 @@
-import express from "express";
+import express from 'express';
-import { login_get, login_post } from "../controllers/root/login.js";
-import { logout_get } from "../controllers/root/logout.js";
-import { root_get } from "../controllers/root/root.js";
-import bodyParser from "../middlewares/formParser.js";
-import session from "../middlewares/sessions.js";
-import { checkUsername, checkPassword } from "../utils/checks.js";
+import { login_get, login_post } from '../controllers/root/login.js';
+import { logout_get } from '../controllers/root/logout.js';
+import { root_get } from '../controllers/root/root.js';
+import bodyParser from '../middlewares/formParser.js';
+import session from '../middlewares/sessions.js';
+import { checkUsername, checkPassword } from '../utils/checks.js';
const router = express.Router();
router.use(session);
-router.get("/", root_get);
-router.get("/login", login_get);
-router.post("/login", [bodyParser, checkUsername, checkPassword], login_post);
-router.get("/logout", logout_get);
+router.get('/', root_get);
+router.get('/login', login_get);
+router.post('/login', [bodyParser, checkUsername, checkPassword], login_post);
+router.get('/logout', logout_get);
export default router;