fix: 接口变更/请求方法为大写
This commit is contained in:
@@ -18,7 +18,7 @@ export async function getLogSet() {
|
||||
// 日志保存时间
|
||||
const logDurationResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'logDuration'`,
|
||||
},
|
||||
@@ -27,7 +27,7 @@ export async function getLogSet() {
|
||||
// 日志最大容量
|
||||
const logCapacityResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'logCapacity'`,
|
||||
},
|
||||
@@ -76,7 +76,7 @@ export async function updateLogSet(data: Record<string, any>) {
|
||||
const value = `${data[key]}`;
|
||||
const result = request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='${key}'`,
|
||||
method: 'put',
|
||||
method: 'PUT',
|
||||
data: { data: { value } },
|
||||
});
|
||||
arr.push(result);
|
||||
@@ -120,7 +120,7 @@ export async function getFtpLogSet() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'ftpLogSet'`,
|
||||
},
|
||||
@@ -151,7 +151,7 @@ export async function getFtpLogSet() {
|
||||
export async function updateFtpLogSet(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='ftpLogSet'`,
|
||||
method: 'put',
|
||||
method: 'PUT',
|
||||
data: { data: { value_json: JSON.stringify(data) } },
|
||||
});
|
||||
// 解析数据
|
||||
@@ -176,7 +176,7 @@ export async function getRemoteOut() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'remoteLogSet'`,
|
||||
},
|
||||
@@ -206,7 +206,7 @@ export async function getRemoteOut() {
|
||||
export async function updateRemoteOut(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='remoteLogSet'`,
|
||||
method: 'put',
|
||||
method: 'PUT',
|
||||
data: { data: { value_json: JSON.stringify(data) } },
|
||||
});
|
||||
// 解析数据
|
||||
@@ -254,7 +254,7 @@ export async function exportLog(query: Record<string, any>) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/${query.logType}`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: {
|
||||
SQL: querySQL,
|
||||
},
|
||||
@@ -277,7 +277,7 @@ export async function exportLog(query: Record<string, any>) {
|
||||
export async function backupLog(logType: string) {
|
||||
const result = await request({
|
||||
url: `/api/rest/dataManagement/v1/omc_db/${logType}/backup`,
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
@@ -300,7 +300,7 @@ export async function backupLog(logType: string) {
|
||||
export async function backupDownload(path: string) {
|
||||
return request({
|
||||
url: `/api/rest/fileManagement/v1/path/file?path=${path}`,
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
@@ -314,7 +314,7 @@ export async function backupDownload(path: string) {
|
||||
export function backupFileList() {
|
||||
return request({
|
||||
url: `/api/rest/fileManagement/v1/files/listFiles`,
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
data: {
|
||||
path: '/usr/local/omc/database',
|
||||
expand: true,
|
||||
|
||||
Reference in New Issue
Block a user