Skip to content

Commit

Permalink
[type:fix] fix can not Modify Selector MetaData Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
VampireAchao committed Nov 7, 2024
1 parent ae241b2 commit d888224
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function getAllMetadata(params) {
}

export async function findMetadata(params) {
return request(`${baseUrl}/meta-data/${params.id}/${params.namespaceId}`, {
return request(`${baseUrl}/meta-data/${params.id}/`, {
method: `GET`,
});
}
Expand Down Expand Up @@ -468,7 +468,7 @@ export async function getAllSelectors(params) {

/* get single selector */
export async function findSelector(params) {
return request(`${baseUrl}/selector/${params.id}/${params.namespaceId}`, {
return request(`${baseUrl}/selector/${params.id}`, {
method: `GET`,
});
}
Expand Down Expand Up @@ -496,7 +496,7 @@ export async function deleteRule(params) {
}

export async function findRule(params) {
return request(`${baseUrl}/rule/${params.id}/${params.namespaceId}`, {
return request(`${baseUrl}/rule/${params.id}`, {
method: `GET`,
});
}
Expand Down
8 changes: 3 additions & 5 deletions src/utils/AuthRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,9 @@ const setMenuIconAndSort = (menus, permissions) => {
}))
export default class AuthRoute extends Component {
componentDidMount() {
const {
global: { permissions },
loading,
path,
} = this.props;
const { global, loading, path } = this.props;
// Fix hot-reload issue in development after code changes
const permissions = global?.permissions;
if (
(!permissions || !permissions.menu || permissions.menu.length === 0) &&
!loading &&
Expand Down

0 comments on commit d888224

Please sign in to comment.