Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(nextcloud)!: Migrate to DAV v2 endpoint for WebDAV #2557

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

provokateurin
Copy link
Member

Replaces #2306
Should help with #2308 and #718 as those require using the v2 endpoints.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 28.79%. Comparing base (a01e746) to head (af1f3d3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/nextcloud/lib/webdav.dart 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2557   +/-   ##
=======================================
  Coverage   28.79%   28.79%           
=======================================
  Files         370      370           
  Lines      136490   136496    +6     
=======================================
+ Hits        39296    39300    +4     
- Misses      97194    97196    +2     
Flag Coverage Δ *Carryforward flag
account_repository 98.47% <ø> (ø)
cookie_store 99.48% <ø> (ø) Carriedforward from a01e746
dashboard_app 96.05% <ø> (ø)
dynamite 31.05% <ø> (ø) Carriedforward from a01e746
dynamite_end_to_end_test 61.69% <ø> (ø) Carriedforward from a01e746
dynamite_runtime 85.40% <ø> (ø) Carriedforward from a01e746
interceptor_http_client 97.18% <ø> (ø) Carriedforward from a01e746
neon_dashboard 96.05% <ø> (ø) Carriedforward from a01e746
neon_framework 61.00% <ø> (ø)
neon_http_client 97.50% <100.00%> (ø)
neon_notifications 100.00% <ø> (ø) Carriedforward from a01e746
neon_storage 94.66% <ø> (ø)
neon_talk 99.45% <ø> (ø) Carriedforward from a01e746
nextcloud 24.26% <84.61%> (+<0.01%) ⬆️
notifications_app 97.40% <ø> (ø)
notifications_push_repository 98.11% <ø> (ø)
sort_box 90.90% <ø> (ø) Carriedforward from a01e746
talk_app 98.94% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
..._client/lib/src/interceptors/csrf_interceptor.dart 100.00% <100.00%> (ø)
...xtcloud/lib/src/api/webdav/models/webdav_file.dart 100.00% <100.00%> (ø)
...nextcloud/lib/src/api/webdav/utils/webdav_uri.dart 100.00% <100.00%> (ø)
...es/nextcloud/lib/src/api/webdav/webdav_client.dart 94.70% <100.00%> (+0.02%) ⬆️
packages/nextcloud/lib/webdav.dart 75.00% <71.42%> (-25.00%) ⬇️

@provokateurin
Copy link
Member Author

What we could do alternatively is to require the username to be passed when creating the WebDavClient. That would be a bit cleaner as then all the http.Request getters can be sync and we avoid doing a network request (since the consumer of the package might already know the username anyway like we do in Neon).

@Leptopoda
Copy link
Member

This is also exactly what I thought.
Let's require the username at creation.

@provokateurin provokateurin force-pushed the refactor/nextcloud/dav-v2-endpoint branch from 1185498 to af1f3d3 Compare October 19, 2024 15:19
@provokateurin
Copy link
Member Author

We could add an extension in the framework that would allow us to still call account.client.webdav without the username by automatically inserting the account username and internally using the underlying extension with the username parameter.
I don't think we really need it, but if you like it I can add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants