[ui] Implement provider test button #49
This commit is contained in:
1 parent
eaa95cf9d1
commit
1a02d89ab9
2 files changed
+23
-7
No files matched your search
@@ -285,11 +285,15 @@ class Mount with ChangeNotifier {
|
||||
|
||||
Future<bool> test() async {
|
||||
try {
|
||||
final map = await convertAllToString(
|
||||
jsonDecode(jsonEncode(mountConfig.settings)),
|
||||
_auth.key,
|
||||
);
|
||||
final auth = await _auth.createAuth();
|
||||
final response = await http.get(
|
||||
Uri.parse(
|
||||
Uri.encodeFull(
|
||||
'${getBaseUri()}/api/v1/test?auth=$auth&name=$name&type=$type&config=${jsonEncode(mountConfig.settings)}',
|
||||
'${getBaseUri()}/api/v1/test?auth=$auth&name=$name&type=$type&config=${jsonEncode(map)}',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user