import { users } from './users';

// 密码验证函数
export async function validatePassword(username: string, password: string): Promise<string | null> {
    // 查找用户并验证密码
    const user = users.demoUsers.find(u => u.username === username);
    if (!user || password !== 'demo123') {
        return null;
    }
    return user.sub; // 返回用户ID
} 