Skip to content

Commit

Permalink
Merge branch 'main' into login-google
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonuu20 authored Oct 30, 2024
2 parents 503b41e + 1cf73ad commit 5537070
Show file tree
Hide file tree
Showing 20 changed files with 1,832 additions and 770 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ Welcome to repository of Station Guide
<!-- Added the GSSoc Accepted image -->
### This project is now OFFICIALLY accepted for

<div align="center">
<img src="https://github.com/apu52/METAVERSE/assets/114172928/e79eb6de-81b1-4ffb-b6ed-f018bb977e88" alt="GSSoC 2024 Extd" width="80%">
</div>
<br>
## 📋 Participating Programs

| Name | Logo | Purpose |
|-----------------------|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| GSSoC'2024-Extd | ![GSSoC Logo](assets/GSSoC-Ext.png) | The coding period is from October 1st to October 30th, during which contributors make contributions and earn points on the platform. |
| Hacktoberfest 2024 | ![Hacktoberfest Logo](assets/hacktoberfest.png) | Hacktoberfest is a month-long October event welcoming all skill levels to join the open-source community. |

---

<!--Line-->
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900">
Expand Down
Binary file added assets/GSSoC-Ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hacktoberfest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/image
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

16 changes: 16 additions & 0 deletions backend/package-lock.json

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

1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"depcheck": "^1.4.7",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"express-rate-limit": "^7.4.1",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.7.0",
"node": "^22.8.0",
Expand Down
24 changes: 16 additions & 8 deletions backend/routes/authRoutes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import express from "express";
import rateLimit from "express-rate-limit";
import {
registerUser,
loginUser,
Expand All @@ -14,30 +15,37 @@ import { submitFeedback } from "../controllers/submitFeedback.js";

const router = express.Router();

const loginLimiter = rateLimit({
windowMs: 5 * 60 * 1000, // 55 minutes
max: 5, // Limit each IP to 5 requests per windowMs
message: "Too many login attempts from this IP, please try again later.",
});

// Register route
router.post("/register", registerUser);

// Login route
router.post("/login", loginUser);
// Login route with rate limiter
router.post("/login", loginLimiter, loginUser);

// Logout route
router.post("/logout", verifyJWT, logoutUser);

// Verify route
router.get("/verify", verifyUser);

// Feedback route
router.post("/feedback", verifyJWT, submitFeedback);

router.post("/feedback" , verifyJWT, submitFeedback)

//cloakroom bookings route
// Cloakroom bookings route
router.post("/bookCloakroom", verifyJWT, createCloakroomBooking);

//wheelchair bookings route
// Wheelchair bookings route
router.post("/bookWheelchair", verifyJWT, createWheelchairBooking);

//coolie bookings route
// Coolie bookings route
router.post("/bookCoolie", verifyJWT, createCoolieBooking);

// get all stations route
// Get all stations route
router.get("/all-stations", verifyJWT, sendStations);

export default router;
Loading

0 comments on commit 5537070

Please sign in to comment.