chore: Implement a fake response for testing (#202)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-01-06 18:10:36 +01:00 committed by GitHub
parent 5b781cf642
commit d60fec405a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 729 additions and 27 deletions

View file

@ -50,9 +50,9 @@ class AuthNotifier extends StateNotifier<LoginScreenModel> {
state = state.copyWith(loading: true);
clearAllProviders();
var response = await api.usersAuthenticateByNamePost(userName: userName, password: password);
var serverResponse = await api.systemInfoPublicGet();
CredentialsModel credentials = state.tempCredentials;
if (response.isSuccessful && (response.body?.accessToken?.isNotEmpty ?? false)) {
var serverResponse = await api.systemInfoPublicGet();
credentials = credentials.copyWith(
token: response.body?.accessToken ?? "",
serverId: response.body?.serverId,