Skip to content

Commit

Permalink
optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghaiyang committed Dec 14, 2019
1 parent 30ace4f commit 4dd62c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion lib/src/ApplicationConfigurationResourceFinder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class _ApplicationConfigurationResourceFinder implements ApplicationConfiguratio
if (path.contains(matcher)) {
allPaths_[getFileName(filePath)] = filePath;
}

}
}
String defaultConfigurationFilename = APPLICATION_CONFIGURATION_RESOURCE_PREFIX;
Expand Down
3 changes: 1 addition & 2 deletions lib/src/helpers/UnSupportedContentTypeHelper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import 'package:Q/src/Application.dart';

class UnSupportedContentTypeHelper {
static bool checkSupported(HttpRequest req) {
List<ContentType> unAllowedContentTypes =
Application.getApplicationContext().configuration.httpRequestConfigure.unAllowedContentTypes;
List<ContentType> unAllowedContentTypes = Application.getApplicationContext().configuration.httpRequestConfigure.unAllowedContentTypes;
if (unAllowedContentTypes.isEmpty) return true;
return unAllowedContentTypes.indexWhere((contentType) => contentType.mimeType == req.headers.contentType.mimeType) == -1;
}
Expand Down
10 changes: 1 addition & 9 deletions lib/src/helpers/reflect/BodyReflectHelper.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import 'dart:io';
import 'dart:mirrors';

import 'package:Q/src/Router.dart';
import 'package:Q/src/annotation/Body.dart';
import 'package:Q/src/annotation/RequestParam.dart';
import 'package:Q/src/exception/RequestParamRequiredException.dart';
import 'package:Q/src/helpers/reflect/ReflectHelper.dart';
import 'package:Q/src/multipart/MultipartValueMap.dart';
import 'package:Q/src/query/CommonValue.dart';
import 'package:Q/src/query/MultipartFile.dart';

class BodyReflectHelper {
// 通过反射获取使用RequestParam注解的参数
Expand All @@ -22,9 +16,7 @@ class BodyReflectHelper {
// multipart/form-data类型
if (data is MultipartValueMap) {
// TODO
} else {

}
} else {}
}
}
}
8 changes: 2 additions & 6 deletions lib/src/loader/ResourceLoader.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
abstract class ResourceLoader {

}
abstract class ResourceLoader {}

class _ResourceLoader implements ResourceLoader {

}
class _ResourceLoader implements ResourceLoader {}

0 comments on commit 4dd62c9

Please # to comment.