diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml
index c407763..bb9fd19 100644
--- a/.github/workflows/build-check.yml
+++ b/.github/workflows/build-check.yml
@@ -4,7 +4,7 @@ on:
pull_request:
branches: [ main ]
push:
- branches: [ main ]
+ branches: [ "**" ]
jobs:
validate-and-build:
@@ -32,11 +32,13 @@ jobs:
run: npm run lint --if-present
- name: Validate Prisma Schema
- # Ensures the database relationships and syntax are correct
+ env:
+ DATABASE_URL: "postgresql://dummy:dummy@localhost:5432/dummy"
run: npx prisma validate --schema=backend/prisma/schema.prisma
- name: Test Prisma Client Generation
- # Ensures Prisma can successfully build the client from the schema
+ env:
+ DATABASE_URL: "postgresql://dummy:dummy@localhost:5432/dummy"
run: npx prisma generate --schema=backend/prisma/schema.prisma
- name: Build Frontend
diff --git a/backend/src/app.js b/backend/src/app.js
index d5f42bf..a5149f5 100644
--- a/backend/src/app.js
+++ b/backend/src/app.js
@@ -17,10 +17,12 @@ const eventsRoutes = require('./modules/events/events.routes');
function createApp() {
const app = express();
- app.use(cors({
- origin: process.env.FRONTEND_URL || 'http://localhost:5173',
- credentials: true,
- }));
+ app.use(
+ cors({
+ origin: process.env.FRONTEND_URL || 'http://localhost:5173',
+ credentials: true,
+ }),
+ );
app.use(express.json());
app.use(cookieParser());
app.use(attachUser);
diff --git a/backend/src/modules/auth/auth.routes.js b/backend/src/modules/auth/auth.routes.js
index 2138cf6..ce94e23 100644
--- a/backend/src/modules/auth/auth.routes.js
+++ b/backend/src/modules/auth/auth.routes.js
@@ -46,9 +46,7 @@ router.post('/google/token', async (req, res, next) => {
return res.status(400).json({ error: 'Missing credential' });
}
- const infoRes = await fetch(
- `https://oauth2.googleapis.com/tokeninfo?id_token=${credential}`,
- );
+ const infoRes = await fetch(`https://oauth2.googleapis.com/tokeninfo?id_token=${credential}`);
const info = await infoRes.json();
if (!infoRes.ok || info.error_description) {
diff --git a/backend/src/modules/matches/matches.service.js b/backend/src/modules/matches/matches.service.js
index bff9c60..0ca7a7f 100644
--- a/backend/src/modules/matches/matches.service.js
+++ b/backend/src/modules/matches/matches.service.js
@@ -54,10 +54,7 @@ async function findMatchesForIntent(intent) {
async function getMatchesForUser(userId) {
const matches = await prisma.match.findMany({
where: {
- OR: [
- { ride: { posterId: userId } },
- { intent: { userId: userId } },
- ],
+ OR: [{ ride: { posterId: userId } }, { intent: { userId: userId } }],
},
include: {
ride: {
@@ -238,4 +235,10 @@ async function rejectMatch(matchId, userId) {
return { ok: true };
}
-module.exports = { findMatchesForRide, findMatchesForIntent, getMatchesForUser, confirmMatch, rejectMatch };
+module.exports = {
+ findMatchesForRide,
+ findMatchesForIntent,
+ getMatchesForUser,
+ confirmMatch,
+ rejectMatch,
+};
diff --git a/backend/src/modules/rides/rides.routes.js b/backend/src/modules/rides/rides.routes.js
index f6ca78f..aa3bb98 100644
--- a/backend/src/modules/rides/rides.routes.js
+++ b/backend/src/modules/rides/rides.routes.js
@@ -2,7 +2,14 @@ const express = require('express');
const { requireAuth } = require('../../middleware/auth');
const { rideCreateLimiter } = require('../../middleware/rate-limit');
const { createRideSchema } = require('./rides.schema');
-const { createRide, getRideById, cancelRide, joinRide, leaveRide, getMyActiveRides } = require('./rides.service');
+const {
+ createRide,
+ getRideById,
+ cancelRide,
+ joinRide,
+ leaveRide,
+ getMyActiveRides,
+} = require('./rides.service');
const router = express.Router();
diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx
index 7497ae8..f8df67d 100644
--- a/frontend/src/main.jsx
+++ b/frontend/src/main.jsx
@@ -6,5 +6,5 @@ import './index.css';
ReactDOM.createRoot(document.getElementById('root')).render(
A better way to share autos out of campus.
{googleError && ( -- {googleError} -
+{googleError}
)} {GOOGLE_CLIENT_ID ? ( @@ -71,8 +70,8 @@ export default function Login() { ) : (- Google sign-in not configured.{' '} - VITE_GOOGLE_CLIENT_ID is missing. + Google sign-in not configured. VITE_GOOGLE_CLIENT_ID{' '} + is missing.
)} diff --git a/frontend/src/pages/PostIntent.jsx b/frontend/src/pages/PostIntent.jsx index 0956a6f..0b51ac1 100644 --- a/frontend/src/pages/PostIntent.jsx +++ b/frontend/src/pages/PostIntent.jsx @@ -139,8 +139,7 @@ export default function PostIntent() {