Skip to content

Commit

Permalink
fix: Adjust routes api version
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jan 23, 2024
1 parent 8d2b52b commit d6f5cb6
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* @author affan98 <[email protected]>
* @author Christian Hartmann <[email protected]>
* @author Ferdinand Thiessen <[email protected]>
* @author John Molakvoæ (skjnldsv) <[email protected]>
* @author Jonas Rittershofer <[email protected]>
*
Expand Down Expand Up @@ -73,7 +74,7 @@
'verb' => 'OPTIONS',
'requirements' => [
'path' => '.+',
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],

Expand All @@ -83,15 +84,15 @@
'url' => '/api/{apiVersion}/forms',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#newForm',
'url' => '/api/{apiVersion}/form',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
Expand All @@ -107,7 +108,7 @@
'url' => '/api/{apiVersion}/form/clone/{id}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
// TODO: Remove POST in next API release
Expand All @@ -124,39 +125,39 @@
'url' => '/api/{apiVersion}/form/update',
'verb' => 'PATCH',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],
[
'name' => 'api#transferOwner',
'url' => '/api/{apiVersion}/form/transfer',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],
[
'name' => 'api#deleteForm',
'url' => '/api/{apiVersion}/form/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#getPartialForm',
'url' => '/api/{apiVersion}/partial_form/{hash}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#getSharedForms',
'url' => '/api/{apiVersion}/shared_forms',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],

Expand All @@ -166,7 +167,7 @@
'url' => '/api/{apiVersion}/question',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
// TODO: Remove POST in next API release
Expand All @@ -183,7 +184,7 @@
'url' => '/api/{apiVersion}/question/update',
'verb' => 'PATCH',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],
// TODO: Remove POST in next API release
Expand All @@ -200,23 +201,23 @@
'url' => '/api/{apiVersion}/question/reorder',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],
[
'name' => 'api#deleteQuestion',
'url' => '/api/{apiVersion}/question/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#cloneQuestion',
'url' => '/api/{apiVersion}/question/clone/{id}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2.3'
'apiVersion' => 'v2\.[3-4]'
]
],

Expand All @@ -226,7 +227,7 @@
'url' => '/api/{apiVersion}/option',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
// TODO: Remove POST in next API release
Expand All @@ -243,15 +244,15 @@
'url' => '/api/{apiVersion}/option/update',
'verb' => 'PATCH',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],
[
'name' => 'api#deleteOption',
'url' => '/api/{apiVersion}/option/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],

Expand All @@ -261,15 +262,15 @@
'url' => '/api/{apiVersion}/share',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'shareApi#deleteShare',
'url' => '/api/{apiVersion}/share/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
// TODO: Remove POST in next API release
Expand All @@ -286,7 +287,7 @@
'url' => '/api/{apiVersion}/share/update',
'verb' => 'PATCH',
'requirements' => [
'apiVersion' => 'v2\.[2-3]'
'apiVersion' => 'v2\.[2-4]'
]
],

Expand All @@ -296,7 +297,7 @@
'url' => '/api/{apiVersion}/submissions/{hash}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
Expand All @@ -320,23 +321,23 @@
'url' => '/api/{apiVersion}/submissions/{formId}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#insertSubmission',
'url' => '/api/{apiVersion}/submission/insert',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
[
'name' => 'api#deleteSubmission',
'url' => '/api/{apiVersion}/submission/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v2(\.[1-3])?'
'apiVersion' => 'v2(\.[1-4])?'
]
],
// Submissions linking with file in cloud
Expand Down

0 comments on commit d6f5cb6

Please sign in to comment.