diff --git a/appinfo/routes.php b/appinfo/routes.php index d549613707..0557ecc816 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -118,6 +118,14 @@ 'apiVersion' => 'v2(\.[1-4])?' ] ], + [ + 'name' => 'api#getForm', + 'url' => '/api/{apiVersion}/forms/{id}', + 'verb' => 'GET', + 'requirements' => [ + 'apiVersion' => 'v3' + ] + ], [ 'name' => 'api#cloneForm', 'url' => '/api/{apiVersion}/form/clone/{id}', diff --git a/src/mixins/ViewsMixin.js b/src/mixins/ViewsMixin.js index 387c3db08b..469df3f5f2 100644 --- a/src/mixins/ViewsMixin.js +++ b/src/mixins/ViewsMixin.js @@ -133,7 +133,7 @@ export default { try { const response = await request( - generateOcsUrl('apps/forms/api/v2.4/form/{id}', { id }), + generateOcsUrl('apps/forms/api/v3/forms/{id}', { id }), ) this.$emit('update:form', OcsResponse2Data(response)) this.isLoadingForm = false diff --git a/tests/Integration/Api/ApiV2Test.php b/tests/Integration/Api/ApiV2Test.php index 6593f89ed9..f00f3d68ea 100644 --- a/tests/Integration/Api/ApiV2Test.php +++ b/tests/Integration/Api/ApiV2Test.php @@ -554,7 +554,7 @@ public function dataGetFullForm() { * @param array $expected */ public function testGetFullForm(array $expected): void { - $resp = $this->http->request('GET', "api/v2.1/form/{$this->testForms[0]['id']}"); + $resp = $this->http->request('GET', "api/v3/forms/{$this->testForms[0]['id']}"); $data = $this->OcsResponse2Data($resp); // Cannot control ids, but check general consistency.