MCPcopy Create free account
hub / github.com/apitable/apitable / updateAvatar

Function updateAvatar

packages/datasheet/src/pc/hooks/use_user_request.ts:485–498  ·  view source on GitHub ↗
(token: string, init?: boolean)

Source from the content-addressed store, hash-verified

483
484 // Update avatar
485 const updateAvatar = (token: string, init?: boolean) => {
486 return Api.updateUser({ avatar: token, init, avatarColor: null }).then((res) => {
487 const { success, data } = res.data;
488 if (success) {
489 Message.success({
490 content: t(Strings.avatar_modified_successfully),
491 });
492 dispatch(StoreActions.setUserAvatarColor(null));
493 dispatch(StoreActions.setUserAvatar(data));
494 dispatch(StoreActions.setReqStatus(true));
495 return;
496 }
497 });
498 };
499
500 const updateAvatarColor = (avatarColor: number) => {
501 return Api.updateUser({

Callers 4

uploadConfirmFunction · 0.85
uploadConfirmFunction · 0.85
uploadImgConfirmFunction · 0.85

Calls 3

tFunction · 0.90
dispatchFunction · 0.85
successMethod · 0.65

Tested by

no test coverage detected