mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#54 run multiple snippets
This commit is contained in:
@@ -276,11 +276,11 @@ class ServerProvider extends BusyProvider {
|
||||
}
|
||||
}
|
||||
|
||||
Future<String?> runSnippet(String id, Snippet snippet) async {
|
||||
Future<String?> runSnippets(String id, List<Snippet> snippets) async {
|
||||
final client = _servers[id]?.client;
|
||||
if (client == null) {
|
||||
return null;
|
||||
}
|
||||
return await client.run(snippet.script).string;
|
||||
return await client.run(snippets.map((e) => e.script).join('&&')).string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user