AI修复建议接口对接

This commit is contained in:
付民康
2025-03-26 20:09:09 +08:00
parent eb55e0171f
commit 94ec137e24
4 changed files with 189 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
import { reqCatchV2, type catchRt } from '@/utils/catch';
import request from '@/utils/request';
import * as types from '@/api/repo/types';
import axios from 'axios';
// 详情-获取版本信息
export function releaseInfo(params: { softwareId: string }): Promise<any> {
@@ -263,3 +264,16 @@ export const getReleaseExport = (data): Promise<any> => {
})
);
}
// 获取AI修复建议
export function getVulSuggestion(data) {
return axios.request({
url: '/gateway/detect' + `/ai/vul_suggestion`,
method: 'POST',
data,
headers: {
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
},
});
}