From b010539c2424cbb4e16c22e3a2c89e8a9b8e30ae Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 12 Mar 2023 15:59:38 +0100 Subject: [PATCH] specs,nextcloud: Fix uppush keepalive type --- packages/nextcloud/lib/src/nextcloud.openapi.dart | 4 ++-- packages/nextcloud/lib/src/nextcloud.openapi.json | 2 +- packages/nextcloud/test/uppush.dart | 2 +- specs/uppush.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index 7c0bde82..59d0524c 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -1204,12 +1204,12 @@ class NextcloudUnifiedPushProviderClient { /// Set keepalive interval. Future setKeepalive( - {required String keepalive}) async { + {required int keepalive}) async { var path = '/index.php/apps/uppush/keepalive'; final queryParameters = {}; final headers = {}; Uint8List? body; - queryParameters['keepalive'] = keepalive; + queryParameters['keepalive'] = keepalive.toString(); final response = await rootClient.doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.json b/packages/nextcloud/lib/src/nextcloud.openapi.json index aacd2154..09f1ccd8 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.json +++ b/packages/nextcloud/lib/src/nextcloud.openapi.json @@ -3462,7 +3462,7 @@ "description": "Keep alive value in seconds", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], diff --git a/packages/nextcloud/test/uppush.dart b/packages/nextcloud/test/uppush.dart index b00c444e..389f9872 100644 --- a/packages/nextcloud/test/uppush.dart +++ b/packages/nextcloud/test/uppush.dart @@ -26,7 +26,7 @@ Future run(final DockerImage image) 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); }); diff --git a/specs/uppush.json b/specs/uppush.json index 8712eacd..342424f6 100644 --- a/specs/uppush.json +++ b/specs/uppush.json @@ -52,7 +52,7 @@ "description": "Keep alive value in seconds", "required": true, "schema": { - "type": "string" + "type": "integer" } } ],