mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00

* feat: app owner change (#2271) * feat(app): changeOwner api * feat: changeOwner api * feat: ChangeOwnerModal * feat: update change owner api * chore: move change owner api into pro version feat(fe): change owner modal * feat: add change owner button and modal to InfoModal * change owner ux * feat: doc * perf: remove info change owner btn --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
39 lines
990 B
TypeScript
39 lines
990 B
TypeScript
import { ErrType } from '../errorCode';
|
|
import { i18nT } from '../../../../web/i18n/utils';
|
|
/* dataset: 502000 */
|
|
export enum AppErrEnum {
|
|
unExist = 'appUnExist',
|
|
unAuthApp = 'unAuthApp',
|
|
invalidOwner = 'invalidOwner',
|
|
invalidAppType = 'invalidAppType'
|
|
}
|
|
const appErrList = [
|
|
{
|
|
statusText: AppErrEnum.unExist,
|
|
message: i18nT('common:code_error.app_error.not_exist')
|
|
},
|
|
{
|
|
statusText: AppErrEnum.unAuthApp,
|
|
message: i18nT('common:code_error.app_error.un_auth_app')
|
|
},
|
|
{
|
|
statusText: AppErrEnum.invalidOwner,
|
|
message: i18nT('common:code_error.app_error.invalid_owner')
|
|
},
|
|
{
|
|
statusText: AppErrEnum.invalidAppType,
|
|
message: i18nT('common:code_error.app_error.invalid_app_type')
|
|
}
|
|
];
|
|
export default appErrList.reduce((acc, cur, index) => {
|
|
return {
|
|
...acc,
|
|
[cur.statusText]: {
|
|
code: 502000 + index,
|
|
statusText: cur.statusText,
|
|
message: cur.message,
|
|
data: null
|
|
}
|
|
};
|
|
}, {} as ErrType<`${AppErrEnum}`>);
|