Skip to content

Commit

Permalink
Fixed bug: http method options and cros error
Browse files Browse the repository at this point in the history
  • Loading branch information
javad-zobeidi committed Mar 3, 2024
1 parent b4679d6 commit acd6fe8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 0.1.1
## 0.1.1+1

- Fixed bug: http method options and cros error

- ## 0.1.1

- Added Hash class

Expand Down
2 changes: 1 addition & 1 deletion lib/src/database/migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class Migration {

void id() {
bigIncrements('id');
primary('id');
}

void bigIncrements(
Expand All @@ -231,7 +232,6 @@ class Migration {
virtuality: virtuality,
increment: true,
);
primary(name);
}

void integer(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/http/request/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class Request {
return _query.values;
}

if (_query[key]) {
if (_query[key] != null) {
return _query[key];
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/route/route_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Future<RouteData?> httpRouteHandler(HttpRequest req) async {
req.headers.value(HttpHeaders.hostHeader),
);
if (route == null) {
if (req.method == HttpRequestMethod.options.name) {
req.response.statusCode = HttpStatus.ok;
if (req.method.toLowerCase() ==
HttpRequestMethod.options.name.toLowerCase()) {
req.response.close();
return null;
} else {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: vania
description: Fast, simple, and powerful backend framework for Dart built with ❤️
version: 0.1.1
version: 0.1.1+1
homepage: https://vdart.dev
repository: https://github.com/vania-dart/framework
issue_tracker: https://github.com/vania-dart/framework/issues
Expand Down

0 comments on commit acd6fe8

Please sign in to comment.