fix logout

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-08 21:37:34 +08:00
parent 6a500f2ede
commit 7692dcd629
2 changed files with 3 additions and 3 deletions

View File

@@ -101,10 +101,10 @@ class UserModel {
await Future.wait([gFFI.abModel.pullAb(), gFFI.groupModel.pull()]);
}
Future<void> logOut() async {
Future<void> logOut({String? apiServer}) async {
final tag = gFFI.dialogManager.showLoading(translate('Waiting'));
try {
final url = await bind.mainGetApiServer();
final url = apiServer ?? await bind.mainGetApiServer();
final authHeaders = getHttpHeaders();
authHeaders['Content-Type'] = "application/json";
await http