MCPcopy Create free account
hub / github.com/OneNoteDev/WebClipper / initializeUserFlighting

Function initializeUserFlighting

src/scripts/extensions/extensionBase.ts:236–249  ·  view source on GitHub ↗

* Initializes the flighting info for the user.

()

Source from the content-addressed store, hash-verified

234 * Initializes the flighting info for the user.
235 */
236 private initializeUserFlighting() {
237 let getFlightingEvent: Log.Event.PromiseEvent = new Log.Event.PromiseEvent(Log.Event.Label.GetFlightingAssignments);
238
239 this.getFlightingAssignments(this.clientInfo.get().clipperId).then((flights: string[]) => {
240 this.updateClientInfoWithFlightInformation(flights);
241 }).catch((error: OneNoteApi.GenericError) => {
242 this.updateClientInfoWithFlightInformation([]);
243
244 getFlightingEvent.setStatus(Log.Status.Failed);
245 getFlightingEvent.setFailureInfo(error);
246 }).then(() => {
247 this.logger.logEvent(getFlightingEvent);
248 });
249 }
250
251 /**
252 * Returns the current flighting assignment for the user

Callers

nothing calls this directly

Calls 4

setStatusMethod · 0.95
setFailureInfoMethod · 0.95
getMethod · 0.45
logEventMethod · 0.45

Tested by

no test coverage detected