Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Jc/matcher - #48

Merged
anachlas merged 60 commits into
masterfrom
jc/matcher
Apr 26, 2016
Merged

anachlas merged 60 commits into
masterfrom
jc/matcher

Conversation

@itsjoeconway

Copy link
Copy Markdown
Contributor

No description provided.

…bject that is JSON encodable to be the return body of a Response in HttpController
…cts (no need). Now no need to override noSuchMethod.
Comment thread lib/db/model_controller.dart Outdated
requestModel = reflectedModel.reflectee;
// The bodyMap can't define the id.
if (bodyMap[idPathVariableName] != null) {
if (requestModel.dynamicBacking[requestModel.entity.primaryKey] != null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this always be null since the bodyMap hasn't been read in yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should exist, this happens after the request body is read (didDecodeRequestBody), unless I'm missing something somewhere else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this class needs a giant work at some point

expect(res.statusCode, 200);
});

test("Sending bad JSON returns 500", () async {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

400

@anachlas

anachlas commented Mar 1, 2016

Copy link
Copy Markdown
Contributor

👍

Comment thread lib/base/cors_policy.dart
var origin = request.innerRequest.headers.value("origin");

var headers = {};
if (allowedOrigins.contains("*") || allowedOrigins.contains(origin)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should call isRequestOriginAllowed

@anachlas

anachlas commented Apr 8, 2016

Copy link
Copy Markdown
Contributor

Adding the new allowedRequestHeaders broke a unit test.

@itsjoeconway

Copy link
Copy Markdown
Contributor Author

Thanks fixed

@anachlas

Copy link
Copy Markdown
Contributor

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants