diff --git a/src/main/kotlin/cn/edu/hfut/auto/knowledge/controller/KnowledgeController.kt b/src/main/kotlin/cn/edu/hfut/auto/knowledge/controller/KnowledgeController.kt index 8d4c409..b011dc4 100644 --- a/src/main/kotlin/cn/edu/hfut/auto/knowledge/controller/KnowledgeController.kt +++ b/src/main/kotlin/cn/edu/hfut/auto/knowledge/controller/KnowledgeController.kt @@ -35,7 +35,7 @@ class KnowledgeController( @SaCheckRole("1") @Transactional(rollbackFor = [Throwable::class]) @PostMapping("/file") - suspend fun preUploadFile(@RequestBody vo: KnowledgeFileUploadVO): String { + suspend fun preUploadFile(@RequestBody vo: KnowledgeFileUploadVO): FileTicket { knowledgeRepository.findByNameAndParentId(vo.name, vo.parentId, Knowledge.AS_CHILD_FETCHER)?.let { throw BusinessError(ErrorCode.TARGET_ALREADY_EXISTS) } @@ -65,7 +65,7 @@ class KnowledgeController( } catch (e: KafkaException) { throw BusinessError(ErrorCode.MESSAGING_FAILED, cause = e) } - return ticket + return this } } } \ No newline at end of file