Skip to content

Commit

Permalink
fix local & json_content_type error
Browse files Browse the repository at this point in the history
  • Loading branch information
welefen committed Jun 2, 2015
1 parent a0737c8 commit d02f1ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/hook.js
Expand Up @@ -11,7 +11,7 @@ think.middleware('parse_json_payload', http => {
if (!http.payload) {
return;
}
let types = http.config.post.json_content_type;
let types = http._config.post.json_content_type;
if (types.indexOf(http.contentType) > -1) {
try{
http._post = JSON.parse(http.payload);
Expand Down
2 changes: 1 addition & 1 deletion src/controller/base.js
Expand Up @@ -190,7 +190,7 @@ export default class extends think.base {
*/
lang(useCookie){
if(useCookie){
let key = this.config('think_lang').name;
let key = this.config('local').name;
let value = this.cookie(key);
if(value){
return value;
Expand Down

0 comments on commit d02f1ea

Please sign in to comment.