mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 18:57:05 +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';
|
import 'package:apidash_core/apidash_core.dart';
|
||||||
|
|
||||||
class Importer {
|
class Importer {
|
||||||
Future<List<HttpRequestModel>?> getHttpRequestModelList(
|
Future<List<(String?, HttpRequestModel)>?> getHttpRequestModelList(
|
||||||
ImportFormat fileType,
|
ImportFormat fileType,
|
||||||
String content,
|
String content,
|
||||||
) async {
|
) async {
|
||||||
return switch (fileType) {
|
return switch (fileType) {
|
||||||
ImportFormat.curl => CurlIO().getHttpRequestModelList(content),
|
ImportFormat.curl => CurlIO()
|
||||||
|
.getHttpRequestModelList(content)
|
||||||
|
?.map((t) => (null, t))
|
||||||
|
.toList(),
|
||||||
ImportFormat.postman => null
|
ImportFormat.postman => null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user