mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
Update importer.dart
This commit is contained in:
@@ -2,12 +2,15 @@ import 'package:apidash/consts.dart';
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
|
||||
class Importer {
|
||||
Future<List<HttpRequestModel>?> getHttpRequestModelList(
|
||||
Future<List<(String?, HttpRequestModel)>?> getHttpRequestModelList(
|
||||
ImportFormat fileType,
|
||||
String content,
|
||||
) async {
|
||||
return switch (fileType) {
|
||||
ImportFormat.curl => CurlIO().getHttpRequestModelList(content),
|
||||
ImportFormat.curl => CurlIO()
|
||||
.getHttpRequestModelList(content)
|
||||
?.map((t) => (null, t))
|
||||
.toList(),
|
||||
ImportFormat.postman => null
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user