fix #3418 - slim missing contextpath

This commit is contained in:
wing328
2016-07-20 15:49:41 +08:00
parent d16b761aaf
commit 9fcb8a310d
3 changed files with 29 additions and 21 deletions

View File

@@ -15,7 +15,7 @@ $app = new Slim\App();
* Notes: {{notes}}
{{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}]{{/hasProduces}}
*/
$app->{{httpMethod}}('{{path}}', function($request, $response, $args) {
$app->{{httpMethod}}('{{basePathWithoutHost}}{{path}}', function($request, $response, $args) {
{{#hasHeaderParams}}$headers = $request->getHeaders();{{/hasHeaderParams}}
{{#hasQueryParams}}$queryParams = $request->getQueryParams();
{{#queryParams}}${{paramName}} = $queryParams['{{paramName}}'];{{newline}} {{/queryParams}}{{/hasQueryParams}}