Skip to content

Commit 5f09665

Browse files
Update http.ts
1 parent a90bf6d commit 5f09665

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • packages/configurator/src/source-select-configurator
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright (c) 2023 - present TinyEngine Authors.
3+
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
4+
*
5+
* Use of this source code is governed by an MIT-style license.
6+
*
7+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10+
*
11+
*/
12+
13+
/* metaService: engine.plugins.appmanage.http */
14+
import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
15+
16+
const baseUrl = '/material-center/api';
17+
18+
// 资源管理 -- 根据分组ID获取资源列表
19+
export const fetchResourceListByGroupId = (resourceGroupId: number) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/resource/find/${resourceGroupId}`)
20+
21+
// 资源管理 -- 根据appId查询资源分组列表
22+
export const fetchResourceGroupByAppId = (appId: number) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/resource-group/${appId || getMetaApi(META_SERVICE.GlobalService).getBaseInfo().id}`)

0 commit comments

Comments
 (0)