mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 20:49:21 +08:00
14 lines
479 B
JavaScript
14 lines
479 B
JavaScript
import {addNotification} from '../actions/notification';
|
|
import coralApi from '../helpers/response';
|
|
|
|
import I18n from 'coral-framework/modules/i18n/i18n';
|
|
import translations from './../translations';
|
|
const lang = new I18n(translations);
|
|
|
|
export const editName = (displayName) => (dispatch) => {
|
|
return coralApi('/account/displayname', {method: 'PUT', body: {displayName}})
|
|
.then(() => {
|
|
dispatch(addNotification('success', lang.t('successNameUpdate')));
|
|
});
|
|
};
|