This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: request api of user data (#882)
#### What type of PR is this? /kind improvement #### What this PR does / why we need it: 重构获取用户信息的请求方式,无需再请求所有角色即可获取当前用户的角色信息,适配:halo-dev/halo#3372 相关 PR:#847 #### Which issue(s) this PR fixes: Fixes halo-dev/halo#3342 #### Special notes for your reviewer: 测试方式: 1. Halo 需要切换到 halo-dev/halo#3372 分支。 2. Console 需要 `pnpm install && pnpm build:packages` 3. 测试用户列表、登录、检查角色信息是否显示正确。 #### Does this PR introduce a user-facing change? ```release-note 优化 Console 端用户角色标识的显示名称。 ```
- Loading branch information
Showing
14 changed files
with
370 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Halo Next API | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* The version of the OpenAPI document: 2.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import { Role } from './role' | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import { User } from './user' | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface DetailedUser | ||
*/ | ||
export interface DetailedUser { | ||
/** | ||
* | ||
* @type {User} | ||
* @memberof DetailedUser | ||
*/ | ||
user: User | ||
/** | ||
* | ||
* @type {Array<Role>} | ||
* @memberof DetailedUser | ||
*/ | ||
roles: Array<Role> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
6244e8b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-halo-dev.vercel.app
halo-admin-ui.vercel.app
ui-git-main-halo-dev.vercel.app