From 552a0ca0b9741c394a75badaf67408bc9a4e04ad Mon Sep 17 00:00:00 2001 From: jld3103 Date: Tue, 1 Aug 2023 22:48:34 +0200 Subject: [PATCH] refactor(nextcloud): Remove safe option for mkcol --- packages/nextcloud/lib/src/webdav/client.dart | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/nextcloud/lib/src/webdav/client.dart b/packages/nextcloud/lib/src/webdav/client.dart index 9a99ad7f..cbe9b5a6 100644 --- a/packages/nextcloud/lib/src/webdav/client.dart +++ b/packages/nextcloud/lib/src/webdav/client.dart @@ -116,23 +116,11 @@ class WebDavClient { /// Creates a collection at [path]. /// /// See http://www.webdav.org/specs/rfc2518.html#METHOD_MKCOL for more information. - Future mkcol( - final String path, { - final bool safe = true, - }) async { - final expectedCodes = [ - 201, - if (safe) ...[ - 301, - 405, - ], - ]; - return _send( - 'MKCOL', - _constructPath(path), - expectedCodes, - ); - } + Future mkcol(final String path) async => _send( + 'MKCOL', + _constructPath(path), + [201], + ); /// Deletes the resource at [path]. ///