This commit is contained in:
unknown
2025-03-01 16:17:29 +07:00
parent 63c7142fce
commit 43fbef97f7
8 changed files with 264 additions and 52 deletions

View File

@ -73,7 +73,7 @@ const AuthProvider = ({ children }: PropsWithChildren) => {
const login = async (username: string, password: string) => {
try {
const { data: auth } = await axios
.post(LOGIN_URL, { username, password })
.post(LOGIN_URL, { username, password }) // , { headers: { 'Access-Control-Allow-Origin': "*" }}
.then((response) => response.data);
saveAuth({ ...auth.token, id: auth.user.id, role_name: auth.role_name, user: auth.user });