Skip to content

Commit

Permalink
fix: Move new update share api endpoint to API v2.1
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jan 29, 2023
1 parent bdd63d5 commit f6a347f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
'verb' => 'OPTIONS',
'requirements' => [
'path' => '.+',
'apiVersion' => 'v2'
'apiVersion' => 'v2(\.1)?'
]
],

Expand Down Expand Up @@ -224,7 +224,7 @@
'url' => '/api/{apiVersion}/share/update',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2'
'apiVersion' => 'v2.1'
]
],

Expand Down
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Contains only manipulative question-endpoints. To retrieve options, request the
```

### Update a Share permissions
- Endpoint: `/api/v2/share/update`
- Endpoint: `/api/v2.1/share/update`
- Url-Parameter:
| Parameter | Type | Description |
|------------------|----------|-------------|
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarTabs/SharingSidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default {
this.isLoading = true
try {
const response = await axios.post(generateOcsUrl('apps/forms/api/v2/share/update'), {
const response = await axios.post(generateOcsUrl('apps/forms/api/v2.1/share/update'), {
id: updatedShare.id,
keyValuePairs: {
permissions: updatedShare.permissions,
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Api/ApiV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ public function dataUpdateShare() {
* @param array $fullFormExpected
*/
public function testUpdateShare(array $fullFormExpected) {
$resp = $this->http->request('POST', 'api/v2/share/update', [
$resp = $this->http->request('POST', 'api/v2.1/share/update', [
'json' => [
'id' => $this->testForms[0]['shares'][0]['id'],
'keyValuePairs' => [
Expand Down

0 comments on commit f6a347f

Please sign in to comment.