Fix config path, env secrets, and align API calls
This commit is contained in:
@@ -9,7 +9,7 @@ function LoginForm() {
|
||||
|
||||
const login = async () => {
|
||||
try {
|
||||
const res = await axios.post('/api/login', { username, password });
|
||||
const res = await axios.post('/login', { username, password });
|
||||
localStorage.setItem('token', res.data.token);
|
||||
localStorage.setItem('role', res.data.role);
|
||||
navigate('/');
|
||||
|
||||
@@ -7,7 +7,7 @@ function Md5Tool() {
|
||||
|
||||
const hashPassword = async () => {
|
||||
try {
|
||||
const res = await axios.post('/api/hash/md5', { password: input });
|
||||
const res = await axios.post('/hash/md5', { password: input });
|
||||
|
||||
setResult(res.data.md5);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user