Skip to content

Commit 1c3b95c

Browse files
Merge branch 'main' of github.com:AET-DevOps25/team-devoops into feature/monitoring-with-compose
2 parents 32464f3 + 8f70c5e commit 1c3b95c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

client/src/components/CreateMatchRequestDialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ const CreateMatchRequestDialog: React.FC<CreateMatchRequestDialogProps> = ({
152152
return;
153153
}
154154

155-
const formattedDate = selectedDate.toISOString().split('T')[0]; // YYYY-MM-DD format
155+
const formattedDate = selectedDate
156+
? `${selectedDate.getFullYear()}-${String(selectedDate.getMonth() + 1).padStart(2, '0')}-${String(selectedDate.getDate()).padStart(2, '0')}`
157+
: '';
156158

157159
const demoData = {
158160
userID: userID,

client/src/components/MatchRequests.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ const MatchRequests = () => {
173173

174174
return (
175175
<Box>
176+
<Alert severity="info" sx={{ mb: 2 }}>
177+
You can only create <b>one match request per day</b>. It is not possible to create two match requests for the same day.
178+
</Alert>
176179
<Box sx={{ mb: 3 }}>
177180
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 3 }}>
178181
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>

client/src/services/matchesService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const useMatchesService = () => {
6464

6565
const acceptMatch = async (matchId: string): Promise<void> => {
6666
try {
67-
await api.post(`${API_VERSION}/matching/match/${matchId}/accept`);
67+
await api.get(`${API_VERSION}/matching/rsvp/${matchId}/accept`);
6868
} catch (error) {
6969
console.error('Error accepting match:', error);
7070
throw error;
@@ -73,7 +73,7 @@ export const useMatchesService = () => {
7373

7474
const rejectMatch = async (matchId: string): Promise<void> => {
7575
try {
76-
await api.post(`${API_VERSION}/matching/match/${matchId}/reject`);
76+
await api.get(`${API_VERSION}/matching/rsvp/${matchId}/reject`);
7777
} catch (error) {
7878
console.error('Error rejecting match:', error);
7979
throw error;

0 commit comments

Comments
 (0)