-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff527a2
commit ed36a2f
Showing
7 changed files
with
307 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{{#isFormParam}} | ||
val {{paramName}} = Try(fileMultiParams("{{paramName}}").head).toOption | ||
val {{paramName}} = Try(fileMultiParams("{{baseName}}").head).toOption | ||
.map(a => new String(a.get())) | ||
.orElse(multiParams("{{paramName}}").headOption) | ||
.orElse(multiParams("{{baseName}}").headOption) | ||
{{#required}} | ||
.getOrElse(halt(400, "Form parameter {{paramName}} not specified.")) | ||
.getOrElse(halt(400, "Form parameter {{baseName}} not specified.")) | ||
{{/required}} | ||
{{/isFormParam}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{{#isQueryParam}} | ||
{{#required}} | ||
val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}") | ||
.getOrElse(halt(400, "Query parameter {{paramName}} not specified.")) | ||
val {{paramName}} = params.getAs[{{dataType}}]("{{baseName}}") | ||
.getOrElse(halt(400, "Query parameter {{baseName}} not specified.")) | ||
{{/required}} | ||
{{^required}} | ||
val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}") | ||
val {{paramName}} = params.getAs[{{dataType}}]("{{baseName}}") | ||
{{/required}} | ||
{{/isQueryParam}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.