You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 webURLForResource and webURLForPublicShareToken methods on
BaseGraphService, and convert the cs3ResourceToDriveItem and
formatDriveItems free functions into 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.
0 commit comments