Skip to content

Commit

Permalink
feat: update API
Browse files Browse the repository at this point in the history
  • Loading branch information
leve68 committed Feb 12, 2025
1 parent 3355f58 commit 77860e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages/MyPage/hooks/useActiveMemberManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export const useActiveMemberManagement = () => {
*/
const transferMemberIdsToOM = (memberIds: number[]) => {
try {
api.patch('/v1/api/member/status', { memberIds: memberIds });
api.patch(
'/v1/api/member/status',
{ memberIds: memberIds },
{ params: { target: 'RETIRE' } },
);
} catch (error) {
console.error('Failed to patch active members to old members:', error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyPage/hooks/useOMManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useOMManagement = () => {
*/
const transferMemberIdToActive = (memberId: number) => {
try {
api.patch(`/v1/api/member/${memberId}/status`);
api.patch(`/v1/api/member/${memberId}/status`, null, { params: { target: 'APPROVED' } });
} catch (error) {
console.error('Failed to patch old member to active member:', error);
}
Expand Down

0 comments on commit 77860e5

Please sign in to comment.