Browse Source

specs,nextcloud: Fix uppush keepalive type

pull/217/head
jld3103 2 years ago
parent
commit
b010539c24
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  2. 2
      packages/nextcloud/lib/src/nextcloud.openapi.json
  3. 2
      packages/nextcloud/test/uppush.dart
  4. 2
      specs/uppush.json

4
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -1204,12 +1204,12 @@ class NextcloudUnifiedPushProviderClient {
/// Set keepalive interval. /// Set keepalive interval.
Future<NextcloudUnifiedPushProviderSetKeepaliveResponse200ApplicationJson> setKeepalive( Future<NextcloudUnifiedPushProviderSetKeepaliveResponse200ApplicationJson> setKeepalive(
{required String keepalive}) async { {required int keepalive}) async {
var path = '/index.php/apps/uppush/keepalive'; var path = '/index.php/apps/uppush/keepalive';
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
queryParameters['keepalive'] = keepalive; queryParameters['keepalive'] = keepalive.toString();
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'put', 'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(),

2
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -3462,7 +3462,7 @@
"description": "Keep alive value in seconds", "description": "Keep alive value in seconds",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "integer"
} }
} }
], ],

2
packages/nextcloud/test/uppush.dart

@ -26,7 +26,7 @@ Future run(final DockerImage image) async {
}); });
test('Set keepalive', () async { test('Set keepalive', () async {
final response = await client.unifiedPushProvider.setKeepalive(keepalive: '10'); final response = await client.unifiedPushProvider.setKeepalive(keepalive: 10);
expect(response.success, isTrue); expect(response.success, isTrue);
}); });

2
specs/uppush.json

@ -52,7 +52,7 @@
"description": "Keep alive value in seconds", "description": "Keep alive value in seconds",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "integer"
} }
} }
], ],

Loading…
Cancel
Save