Skip to content

Commit 36a8bee

Browse files
author
Achyut Kumar M
committed
username
1 parent 92347fe commit 36a8bee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GoInfoGame/GoInfoGame/Login/SessionManager.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ final class SessionManager: ObservableObject {
1818
var lastLoginPassword: String?
1919

2020
func performLogin(username: String, password: String, environment: APIEnvironment, completion: @escaping (Bool) -> Void) {
21-
let postParams = ["username": username, "password": password]
21+
let userName = KeychainManager.load(.username, for: environment) ?? username
22+
let postParams = ["username": userName, "password": password]
2223
guard let postBody = try? JSONSerialization.data(withJSONObject: postParams) else {
2324
completion(false)
2425
return

0 commit comments

Comments
 (0)