@adonisjs/http-server 5.7.2 → 5.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ class BriskRoute extends macroable_1.Macroable {
47
47
  if (this.route) {
48
48
  throw new utils_1.Exception(`\`Route.${invokedBy}\` and \`${this.invokedBy}\` cannot be called together`, 500, 'E_MULTIPLE_BRISK_HANDLERS');
49
49
  }
50
- this.route = new Route_1.Route(this.pattern, methods || ['HEAD', 'GET'], handler, this.globalMatchers);
50
+ this.route = new Route_1.Route(this.pattern, methods || ['GET', 'HEAD'], handler, this.globalMatchers);
51
51
  this.invokedBy = invokedBy;
52
52
  return this.route;
53
53
  }
@@ -62,11 +62,11 @@ class RouteResource extends macroable_1.Macroable {
62
62
  const fullUrl = `${resourceTokens
63
63
  .map((token) => `${token}/:${helpers_1.string.snakeCase((0, pluralize_1.singular)(token))}_id`)
64
64
  .join('/')}/${mainResource}`;
65
- this.makeRoute(fullUrl, ['HEAD', 'GET'], 'index');
66
- this.makeRoute(`${fullUrl}/create`, ['HEAD', 'GET'], 'create');
65
+ this.makeRoute(fullUrl, ['GET', 'HEAD'], 'index');
66
+ this.makeRoute(`${fullUrl}/create`, ['GET', 'HEAD'], 'create');
67
67
  this.makeRoute(fullUrl, ['POST'], 'store');
68
- this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['HEAD', 'GET'], 'show');
69
- this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id/edit`, ['HEAD', 'GET'], 'edit');
68
+ this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['GET', 'HEAD'], 'show');
69
+ this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id/edit`, ['GET', 'HEAD'], 'edit');
70
70
  this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['PUT', 'PATCH'], 'update');
71
71
  this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['DELETE'], 'destroy');
72
72
  }
@@ -100,7 +100,7 @@ class Router {
100
100
  * Define `GET` route
101
101
  */
102
102
  get(pattern, handler) {
103
- return this.route(pattern, ['HEAD', 'GET'], handler);
103
+ return this.route(pattern, ['GET', 'HEAD'], handler);
104
104
  }
105
105
  /**
106
106
  * Define `POST` route
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/http-server",
3
- "version": "5.7.2",
3
+ "version": "5.7.3",
4
4
  "description": "AdonisJS HTTP server with support packed with Routing and Cookies",
5
5
  "main": "build/providers/HttpServerProvider.js",
6
6
  "files": [