From 9e157d0f0ea9bc267bfdcc58d5f8f014f11bba5c Mon Sep 17 00:00:00 2001 From: veypi Date: Fri, 8 Nov 2024 18:54:41 +0800 Subject: [PATCH] update --- oaweb/composables/api/app.ts | 39 ++++++++++++------------------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/oaweb/composables/api/app.ts b/oaweb/composables/api/app.ts index f56ddfd..619e806 100644 --- a/oaweb/composables/api/app.ts +++ b/oaweb/composables/api/app.ts @@ -14,8 +14,8 @@ export interface PatchOpts { name?: string icon?: string des?: string - init_role_id?: string typ?: string + init_role_id?: string status?: string } export function Patch(app_id: string, json: PatchOpts) { @@ -37,14 +37,14 @@ export function Post(json: PostOpts) { return webapi.Post(`/app`, { json }) } -export interface ListOpts { +export interface ListQuery { name?: string } export function List(query: ListQuery) { return webapi.Get(`/app`, { query }) } -export interface AppUserGetOpts { +export interface AppUserGetQuery { user_id: string } export function AppUserGet(app_id: string, app_user_id: string, query: AppUserGetQuery) { @@ -62,7 +62,7 @@ export function AppUserDelete(app_id: string, app_user_id: string) { return webapi.Delete(`/app/${app_id}/app_user/${app_user_id}`, {}) } -export interface AppUserListOpts { +export interface AppUserListQuery { user_id?: string status?: string } @@ -78,21 +78,6 @@ export function AppUserPost(app_id: string, json: AppUserPostOpts) { return webapi.Post(`/app/${app_id}/app_user`, { json }) } -export function ResourceList(app_id: string) { - return webapi.Get(`/app/${app_id}/resource`, {}) -} - -export interface ResourcePostOpts { - name: string - des: string -} -export function ResourcePost(app_id: string, json: ResourcePostOpts) { - return webapi.Post(`/app/${app_id}/resource`, { json }) -} - -export interface ResourceDeleteOpts { - name: string -} export function ResourceGet(app_id: string, resource_id: string) { return webapi.Get(`/app/${app_id}/resource/${resource_id}`, {}) } @@ -108,13 +93,15 @@ export function ResourceDelete(app_id: string, resource_id: string) { return webapi.Delete(`/app/${app_id}/resource/${resource_id}`, {}) } -export interface ListQuery { - name?: string +export function ResourceList(app_id: string) { + return webapi.Get(`/app/${app_id}/resource`, {}) } -export interface AppUserGetQuery { - user_id: string + +export interface ResourcePostOpts { + name: string + des: string } -export interface AppUserListQuery { - user_id?: string - status?: string +export function ResourcePost(app_id: string, json: ResourcePostOpts) { + return webapi.Post(`/app/${app_id}/resource`, { json }) } +