fix get_group_files_by_folder

This commit is contained in:
Simplxs 2024-02-24 19:26:31 +08:00
parent 5584a41af0
commit 68ea62ea0b
No known key found for this signature in database
GPG Key ID: E23537FF14DD6507

View File

@ -16,10 +16,10 @@ internal object GetGroupSubFiles: IActionHandler() {
}
suspend operator fun invoke(groupId: Long, folderId: String, echo: JsonElement = EmptyJsonString): String {
FileSvc.getGroupFiles(groupId, folderId).onSuccess {
return ok(it, echo = echo)
}.getOrNull()
return error(why = "获取失败", echo = echo)
return ok(
FileSvc.getGroupFiles(groupId, folderId).getOrElse { return error(why = "获取失败: $it", echo = echo) },
echo = echo
)
}
override val requiredParams: Array<String> = arrayOf("group_id", "folder_id")