Explorar o código

20. 修复打包因为类型不对,导致报错的问题

YunaiV %!s(int64=2) %!d(string=hai) anos
pai
achega
b6f8aaaaf0
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  1. 1 6
      src/api/path/project.api.ts

+ 1 - 6
src/api/path/project.api.ts

@@ -19,12 +19,7 @@ export const projectListApi = async (data: object) => {
 // * 新增项目
 export const createProjectApi = async (data: object) => {
   try {
-    const res = await http(RequestHttpEnum.POST)<{
-      /**
-       * 项目id
-       */
-      id: number
-    }>(`${ModuleTypeEnum.PROJECT}/create`, data)
+    const res = await http(RequestHttpEnum.POST)<number>(`${ModuleTypeEnum.PROJECT}/create`, data)
     return res
   } catch {
     httpErrorHandle()