fix: 修改了preUploadFile接口的返回

master
ArgonarioD 2023-07-04 22:52:21 +08:00
parent ed964bc78c
commit 42757aa7e8
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class KnowledgeController(
@SaCheckRole("1") @SaCheckRole("1")
@Transactional(rollbackFor = [Throwable::class]) @Transactional(rollbackFor = [Throwable::class])
@PostMapping("/file") @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 { knowledgeRepository.findByNameAndParentId(vo.name, vo.parentId, Knowledge.AS_CHILD_FETCHER)?.let {
throw BusinessError(ErrorCode.TARGET_ALREADY_EXISTS) throw BusinessError(ErrorCode.TARGET_ALREADY_EXISTS)
} }
@ -65,7 +65,7 @@ class KnowledgeController(
} catch (e: KafkaException) { } catch (e: KafkaException) {
throw BusinessError(ErrorCode.MESSAGING_FAILED, cause = e) throw BusinessError(ErrorCode.MESSAGING_FAILED, cause = e)
} }
return ticket return this
} }
} }
} }