Skip to content

Commit

Permalink
Merge pull request #115 from PLADI-ALM/feat/PDW-46-delete-user
Browse files Browse the repository at this point in the history
[PDW-46/feat] 직원 탈퇴 API 연결
  • Loading branch information
psyeon1120 authored Oct 31, 2023
2 parents eec0725 + 18dd8af commit c1e8b90
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/pages/manager/userManage/UserMoreModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, {useState} from 'react';
import {MenuText, MoreModalView, NormalDiv, RedDiv} from "../../../components/modal/MoreModal";
import {UserModal} from "./UserModal";
import {AdminUsersAxios} from "../../../api/AxiosApi";
import {getToken} from "../../../utils/IsLoginUtil";
import {basicError} from "../../../utils/ErrorHandlerUtil";

export function UserMoreModal(props) {
const [isOpen, setIsOpen] = useState(false)
Expand All @@ -14,7 +17,17 @@ export function UserMoreModal(props) {
};

const deleteUser = (e) => {

AdminUsersAxios.delete(`/${props.id}`, {
headers: {
Authorization: getToken()
}
})
.then((response) => {
alert("탈퇴 완료 되었습니다.")
})
.catch((error) => {
basicError(error)
})
};

return (
Expand Down

0 comments on commit c1e8b90

Please sign in to comment.