1
0
Fork 0
mirror of synced 2024-05-24 14:39:53 +12:00

fix changed getURL to getPath

This commit is contained in:
Damodar Lohani 2021-08-19 10:50:21 +05:45
parent c513c6c0ca
commit 9170f64a75
7 changed files with 14 additions and 15 deletions

View file

@ -316,7 +316,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) {
if($route) {
Console::error('[Error] Method: '.$route->getMethod());
Console::error('[Error] URL: '.$route->getURL());
Console::error('[Error] URL: '.$route->getPath());
}
Console::error('[Error] Type: '.get_class($error));

View file

@ -518,7 +518,7 @@ App::shutdown(function($utopia, $response, $request) {
throw new Exception('Failed to read results', 500);
}
$result[$route->getMethod() . ':' . $route->getURL()] = true;
$result[$route->getMethod() . ':' . $route->getPath()] = true;
$tests = \array_merge($tests, $result);
@ -526,5 +526,5 @@ App::shutdown(function($utopia, $response, $request) {
throw new Exception('Failed to save resutls', 500);
}
$response->dynamic(new Document(['result' => $route->getMethod() . ':' . $route->getURL() . ':passed']), Response::MODEL_MOCK);
$response->dynamic(new Document(['result' => $route->getMethod() . ':' . $route->getPath() . ':passed']), Response::MODEL_MOCK);
}, ['utopia', 'response', 'request'], 'mock');

View file

@ -40,7 +40,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e
->setParam('{userId}', $user->getId())
->setParam('{userAgent}', $request->getUserAgent(''))
->setParam('{ip}', $request->getIP())
->setParam('{url}', $request->getHostname().$route->getURL())
->setParam('{url}', $request->getHostname().$route->getPath())
;
//TODO make sure we get array here

View file

@ -38,7 +38,7 @@
"appwrite/php-clamav": "1.1.*",
"appwrite/php-runtimes": "0.4.*",
"utopia-php/framework": "0.17.*",
"utopia-php/framework": "0.18.*",
"utopia-php/abuse": "0.5.*",
"utopia-php/analytics": "0.2.*",
"utopia-php/audit": "0.5.*",

15
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "63a89a825697892a52aa27d6819b5972",
"content-hash": "45963af754680568d89330a4f37c40d1",
"packages": [
{
"name": "adhocore/jwt",
@ -1756,16 +1756,16 @@
},
{
"name": "utopia-php/framework",
"version": "0.17.2",
"version": "0.18.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
"reference": "3cd5fa2a9e30040277861f4254c5ccd1b1600952"
"reference": "f577522a5eb8009967b893fb7ad4ee70d3f7c0db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/3cd5fa2a9e30040277861f4254c5ccd1b1600952",
"reference": "3cd5fa2a9e30040277861f4254c5ccd1b1600952",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/f577522a5eb8009967b893fb7ad4ee70d3f7c0db",
"reference": "f577522a5eb8009967b893fb7ad4ee70d3f7c0db",
"shasum": ""
},
"require": {
@ -1799,9 +1799,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/framework/issues",
"source": "https://github.com/utopia-php/framework/tree/0.17.2"
"source": "https://github.com/utopia-php/framework/tree/0.18.0"
},
"time": "2021-08-02T10:18:26+00:00"
"time": "2021-08-19T04:58:47+00:00"
},
{
"name": "utopia-php/image",
@ -4882,7 +4882,6 @@
"type": "github"
}
],
"abandoned": true,
"time": "2020-09-28T06:45:17+00:00"
},
{

View file

@ -91,7 +91,7 @@ class OpenAPI3 extends Format
$usedModels = [];
foreach ($this->routes as $route) { /** @var \Utopia\Route $route */
$url = \str_replace('/v1', '', $route->getURL());
$url = \str_replace('/v1', '', $route->getPath());
$scope = $route->getLabel('scope', '');
$hide = $route->getLabel('sdk.hide', false);
$consumes = [$route->getLabel('sdk.request.type', 'application/json')];

View file

@ -89,7 +89,7 @@ class Swagger2 extends Format
$usedModels = [];
foreach ($this->routes as $route) { /** @var \Utopia\Route $route */
$url = \str_replace('/v1', '', $route->getURL());
$url = \str_replace('/v1', '', $route->getPath());
$scope = $route->getLabel('scope', '');
$hide = $route->getLabel('sdk.hide', false);
$consumes = [$route->getLabel('sdk.request.type', 'application/json')];