Skip to content

Commit d544728

Browse files
fix: make reject and accept a get request
1 parent 2adbe32 commit d544728

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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/rsvp/${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/rsvp/${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)