[ui] Implement provider test button #49

This commit is contained in:
2025-04-24 06:54:53 -05:00
parent eaa95cf9d1
commit 1a02d89ab9
2 changed files with 23 additions and 7 deletions

View File

@@ -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)}',
),
),
);