esLint
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
import bcrypt from "bcryptjs";
|
||||
import { generateToken } from "../utils/cryptoUtils";
|
||||
import USERS from "../config/users";
|
||||
import { setAdminLoggedIn } from "../../../../redux/slices/authSlice"; // ✅ Wichtig
|
||||
import { setAdminLoggedIn } from "@/redux/slices/authSlice"; // ✅ Wichtig
|
||||
import { AppDispatch } from "@/redux/store"; // Import your AppDispatch type
|
||||
|
||||
const handleAdminLogin = (
|
||||
username: string,
|
||||
password: string,
|
||||
onSuccess: () => void,
|
||||
onError: (errorMsg: string) => void,
|
||||
dispatch: any // ✅ neu
|
||||
onError: (message: string) => void,
|
||||
dispatch: AppDispatch // Use the correct dispatch type
|
||||
) => {
|
||||
const user = USERS.Admin;
|
||||
bcrypt.compare(password, user.password, (err, isMatch) => {
|
||||
|
||||
Reference in New Issue
Block a user