删除
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
import type * as T from './type'
|
||||
import http from '@/utils/http'
|
||||
|
||||
export type * from './type'
|
||||
|
||||
const BASE_URL = '/open/app'
|
||||
|
||||
/** @desc 查询应用列表 */
|
||||
export function listApp(query: T.AppPageQuery) {
|
||||
return http.get<PageRes<T.AppResp[]>>(`${BASE_URL}`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询应用详情 */
|
||||
export function getApp(id: string) {
|
||||
return http.get<T.AppResp>(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 新增应用 */
|
||||
export function addApp(data: any) {
|
||||
return http.post(`${BASE_URL}`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改应用 */
|
||||
export function updateApp(data: any, id: string) {
|
||||
return http.put(`${BASE_URL}/${id}`, data)
|
||||
}
|
||||
|
||||
/** @desc 删除应用 */
|
||||
export function deleteApp(id: string) {
|
||||
return http.del(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 导出应用 */
|
||||
export function exportApp(query: T.AppQuery) {
|
||||
return http.download(`${BASE_URL}/export`, query)
|
||||
}
|
||||
|
||||
/** @desc 获取密钥 */
|
||||
export function getAppSecret(id: string) {
|
||||
return http.get(`${BASE_URL}/${id}/secret`)
|
||||
}
|
||||
|
||||
/** @desc 重置密钥 */
|
||||
export function resetAppSecret(id: string) {
|
||||
return http.patch(`${BASE_URL}/${id}/secret`)
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/** 应用类型 */
|
||||
export interface AppResp {
|
||||
id: string
|
||||
name: string
|
||||
accessKey: string
|
||||
secretKey: string
|
||||
expireTime: string
|
||||
description: string
|
||||
status: 1 | 2
|
||||
createUserString: string
|
||||
createTime: string
|
||||
updateUserString: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export interface AppQuery {
|
||||
description?: string
|
||||
sort: Array<string>
|
||||
}
|
||||
|
||||
export interface AppPageQuery extends AppQuery, PageQuery {}
|
||||
Reference in New Issue
Block a user