Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/src/components/CreateMatchRequestDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ const CreateMatchRequestDialog: React.FC<CreateMatchRequestDialogProps> = ({
return;
}

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

const demoData = {
userID: userID,
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/MatchRequests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ const MatchRequests = () => {

return (
<Box>
<Alert severity="info" sx={{ mb: 2 }}>
You can only create <b>one match request per day</b>. It is not possible to create two match requests for the same day.
</Alert>
<Box sx={{ mb: 3 }}>
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 3 }}>
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
Expand Down
4 changes: 2 additions & 2 deletions client/src/services/matchesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const useMatchesService = () => {

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

const rejectMatch = async (matchId: string): Promise<void> => {
try {
await api.post(`${API_VERSION}/matching/match/${matchId}/reject`);
await api.get(`${API_VERSION}/matching/rsvp/${matchId}/reject`);
} catch (error) {
console.error('Error rejecting match:', error);
throw error;
Expand Down
Loading