示例#1
0
  public static Result addThirdParty() {
    AppUtils.setHeaders(response());

    try {
      ThirdParty thirdParty = Form.form(ThirdParty.class).bindFromRequest().get();
      thirdParty.save();

      return Results.ok(Json.toJson(thirdParty));
    } catch (Exception e) {
      e.printStackTrace();
      return Results.internalServerError(AppUtils.errorJsonResponse(e.getMessage()));
    }
  }