formatted
This commit is contained in:
@@ -1,31 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { Button } from "@mui/material";
|
|
||||||
import axios from "axios";
|
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const handler = () => {
|
|
||||||
try {
|
|
||||||
axios.get("https://rms.witel.ir/test_login?username=witel", {
|
|
||||||
withCredentials: true,
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const handler2 = () => {
|
|
||||||
try {
|
|
||||||
const res = axios.get("https://rms.witel.ir/webapi/user/get-permission", {
|
|
||||||
withCredentials: true,
|
|
||||||
});
|
|
||||||
console.log(res);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button onClick={handler}>login</Button>
|
|
||||||
<Button onClick={handler2}>check</Button>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user