Skip to content

Commit

Permalink
Merge branch 'development_branch' of https://github.com/CS3219-AY2425…
Browse files Browse the repository at this point in the history
…S1/cs3219-ay2425s1-project-g38 into development_branch
  • Loading branch information
dloh2236 committed Nov 9, 2024
2 parents 8d371ad + 7a29119 commit 9e045ab
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
6 changes: 5 additions & 1 deletion collaboration-service/src/controller/session-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ export const sessionController = {
const { sessionId } = req.body;

try {
const session = await Session.findOne({ session_id: sessionId, active: false });
const session = await Session.findOne({ session_id: sessionId});

if (!session) {
return res.status(404).json({ message: 'Session not found' });
}

if (session.active) {
return res.status(400).json({ message: 'Session is still ongoing' });
}

const yDoc = new Y.Doc();
const yDocBuffer = session.yDoc;

Expand Down
6 changes: 3 additions & 3 deletions kubernetes/collab-service/collab-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ spec:
- secretRef:
name: collab-secrets
resources:
requests:
memory: "250Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "250m"
4 changes: 2 additions & 2 deletions kubernetes/matching-service/matching-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ spec:
name: matching-secrets
resources:
requests:
memory: "250Mi"
cpu: "100m"
memory: "1Gi"
cpu: "250m"
4 changes: 2 additions & 2 deletions kubernetes/question-service/question-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ spec:
name: app-secrets
resources:
requests:
memory: "250Mi"
cpu: "100m"
memory: "1Gi"
cpu: "250m"
4 changes: 2 additions & 2 deletions kubernetes/user-service/user-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ spec:
name: user-secrets
resources:
requests:
memory: "250Mi"
cpu: "100m"
memory: "1Gi"
cpu: "250m"
2 changes: 2 additions & 0 deletions question-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ COPY ./src ./src

COPY ./tsconfig.json ./

RUN npm run build

CMD ["npm", "start"]
2 changes: 1 addition & 1 deletion question-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/server.js",
"scripts": {
"build": "npx tsc",
"start": "ts-node src/server.ts",
"start": "node dist/server.js",
"dev": "nodemon src/server.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 9e045ab

Please sign in to comment.