session sign out
parent
8b2e631e3e
commit
71f0abf37b
|
@ -1,12 +1,6 @@
|
|||
import { Badge, Button, Space, Table } from "antd";
|
||||
import { Badge, Space, Table } from "antd";
|
||||
import { useContext } from "react";
|
||||
import {
|
||||
Constants,
|
||||
FormatDatetime,
|
||||
UseUserSession,
|
||||
WebSocketContext,
|
||||
} from "../../utils";
|
||||
import { unstable_HistoryRouter } from "react-router-dom";
|
||||
import { Constants, FormatDatetime, WebSocketContext } from "../../utils";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -37,9 +31,16 @@ const columns = [
|
|||
return (
|
||||
<Space size="middle">
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
fetch(`${Constants.API_ADDRESS}/user/session/${record.key}`, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Authorization": JSON.parse(
|
||||
localStorage.getItem("session")
|
||||
),
|
||||
},
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue