Compare commits
No commits in common. "97310e2ba958934fcf5ee910414b4c6735cd6379" and "f70044b9a8114044fb7e821326d9f216f08e2dd3" have entirely different histories.
97310e2ba9
...
f70044b9a8
@ -87,11 +87,6 @@ class Mount with ChangeNotifier {
|
||||
),
|
||||
);
|
||||
|
||||
if (response.statusCode == 404) {
|
||||
_mountList?.reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
await refresh();
|
||||
|
||||
if (!unmount && response.statusCode == 500) {
|
||||
@ -111,7 +106,7 @@ class Mount with ChangeNotifier {
|
||||
|
||||
Future<void> setValue(String key, String value) async {
|
||||
try {
|
||||
final response = await http.put(
|
||||
await http.put(
|
||||
Uri.parse(
|
||||
Uri.encodeFull(
|
||||
'${getBaseUri()}/api/v1/set_value_by_name?name=$name&type=$type&key=$key&value=$value',
|
||||
@ -119,15 +114,6 @@ class Mount with ChangeNotifier {
|
||||
),
|
||||
);
|
||||
|
||||
if (response.statusCode == 404) {
|
||||
_mountList?.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return;
|
||||
}
|
||||
|
||||
return refresh();
|
||||
} catch (e) {
|
||||
debugPrint('$e');
|
||||
@ -144,6 +130,11 @@ class Mount with ChangeNotifier {
|
||||
),
|
||||
);
|
||||
|
||||
if (response.statusCode == 404) {
|
||||
_mountList?.reset();
|
||||
return null;
|
||||
}
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user