feat: 个人中心信息api

This commit is contained in:
汪少伟
2025-03-19 12:31:02 +08:00
parent 8c229edfdf
commit 393c1f7299
2 changed files with 102 additions and 22 deletions

View File

@@ -134,6 +134,32 @@ export const getVulnList = (data): Promise<any> => {
);
};
// 获取SBOM依赖树
export const dependencyTree = (softwareId: any): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/repo/dependency/tree`,
method: 'POST',
data: {
softwareId,
current: 1,
size: 99999
}
})
);
};
// 编辑用户信息(包含订阅默认预警方式)
export const userEdit = (data: any): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/user/edit`,
method: 'POST',
data
})
);
};
// 获取漏洞数据
export const getVulnDetail = (data): Promise<any> => {
return reqCatchV2(() =>
@@ -143,18 +169,18 @@ export const getVulnDetail = (data): Promise<any> => {
data
})
);
}
};
// 迁移批量导入
export function repoImport(data: types.commonRepoReqType){
export function repoImport(data: types.commonRepoReqType) {
return reqCatchV2(() =>
request({
url: `/api/v1/home/software/valid`,
method: 'post',
data,
headers: {
'Content-Type': 'multipart/form-data', // 设置请求头
},
'Content-Type': 'multipart/form-data' // 设置请求头
}
})
);
}
@@ -165,10 +191,10 @@ export const getNoticeList = (data): Promise<any> => {
request({
url: `/api/v1/alert/notice/list`,
method: 'POST',
data,
data
})
);
}
};
// 个人中心-获取组织级预警列表
export const getgroupNoticeList = (data): Promise<any> => {
@@ -176,7 +202,7 @@ export const getgroupNoticeList = (data): Promise<any> => {
request({
url: `/api/v1/alert/group/notice/list`,
method: 'POST',
data,
data
})
);
}
};