MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / getDisplayName

Function getDisplayName

src/Data/UserData.js:304–318  ·  view source on GitHub ↗
(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})

Source from the content-addressed store, hash-verified

302
303 const response = await apiJson(TOGGLE_NICKNAME);
304 const nextDisplayName = response?.['name'];
305
306 await Promise.all([
307 removeCacheValue("displayName"),
308 removeCacheValue("applicants"),
309 removeCacheValue("records"),
310 ...(originalDisplayName ? [removeCacheValue(metadataCacheKey(originalDisplayName))] : []),
311 ...(nextDisplayName ? [removeCacheValue(metadataCacheKey(nextDisplayName))] : []),
312 ...(originalDisplayName && originalAvatarId
313 ? [removeCacheValue(avatarCacheKey(originalDisplayName, originalAvatarId))]
314 : []),
315 ]);
316}
317
318export async function updateContact(contact) {
319 const normalizedContact = typeof contact === 'string' ? JSON.parse(contact) : contact;
320 await apiRequest(UPDATE_CONTACT, {body: {newContact: normalizedContact}});
321 await invalidateMetadataCache();

Callers 15

loaderFunction · 0.90
loaderFunction · 0.90
loaderFunction · 0.90
actionFunction · 0.90
actionFunction · 0.90
loaderFunction · 0.90
actionFunction · 0.90
loaderFunction · 0.90
isAuthApplicantFunction · 0.90
prefetchProfilesFunction · 0.90

Calls 2

loadCachedValueFunction · 0.90
apiJsonFunction · 0.90

Tested by

no test coverage detected