From 42757aa7e820beb9c6c7212f5a2596a84fdb117c Mon Sep 17 00:00:00 2001 From: ArgonarioD Date: Tue, 4 Jul 2023 22:52:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=BA=86preUploadFile?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edu/hfut/auto/knowledge/controller/KnowledgeController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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