Files
opencloud/services
Dominik Schmidt 13da9331f2 refactor(graph): use BaseGraphService.publicBaseURL consistently
drive.WebUrl, driveItem.WebUrl and the public share link WebUrl all
derive from the same config value (graph.spaces.webdav_base), but only
driveItem.WebUrl used the pre-parsed BaseGraphService.publicBaseURL.
The other two re-parsed the config on every call.

Add a webURLForResource method on BaseGraphService for the /f/<id> URLs
(used twice, with a *string return matching the libregraph DriveItem
field shape), and inline g.publicBaseURL for the single /s/<token>
share-link case. Convert cs3ResourceToDriveItem and formatDriveItems
from free functions into BaseGraphService methods so they pick up
logger and publicBaseURL from the receiver. This also aligns them with
the surrounding code: BaseGraphService already exposes ~15 similar
methods, so the two free functions were the odd ones out.

Net: all three WebUrls are now constructed from a single pre-parsed
URL, and the (g.logger, g.publicBaseURL) plumbing at 7 call sites
disappears.
2026-09-07 12:59:08 +02:00
..
2026-09-06 23:16:18 +00:00
2026-08-18 17:17:30 +02:00
2026-06-03 16:28:44 +02:00
2026-08-03 13:20:03 +02:00
2026-09-03 23:17:09 +00:00
2026-07-14 18:12:24 +02:00
2026-09-06 23:16:18 +00:00
2026-06-18 15:05:49 +02:00
2026-08-25 09:55:39 +02:00