Add debug localhost server check

This commit is contained in:
Ethan Pippin 2021-08-31 23:12:20 -06:00
parent b6b78cc617
commit 2006353c60
1 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,13 @@ final class ConnectToServerViewModel: ViewModel {
}
func connectToServer() {
#if targetEnvironment(simulator)
if uriSubject.value == "localhost" {
uriSubject.value = "http://localhost:8096"
}
#endif
LogManager.shared.log.debug("Attempting to connect to server at \"\(uriSubject.value)\"", tag: "connectToServer")
ServerEnvironment.current.create(with: uriSubject.value)
.trackActivity(loading)