Skip to content

Commit cba9d82

Browse files
committed
Returns the appropriate http status code
1 parent 1e59b48 commit cba9d82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/java-play2/app/controllers/BaseApiController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public static Result JsonResponse(Object obj, int code) {
3636
response().setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
3737
response().setHeader("Access-Control-Allow-Headers", "Content-Type, api_key, Authorization");
3838

39-
return ok(w.toString());
39+
return status(code, w.toString());
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)