refactor: word

This commit is contained in:
Methapon2001 2023-11-27 14:11:27 +07:00
parent d8cf568206
commit 3820a05704
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
12 changed files with 56 additions and 56 deletions

View file

@ -20,7 +20,7 @@ import esClient from "../elasticsearch";
import { copyCond, listFolder, listItem, replaceIllegalChars } from "../utils/minio";
import HttpStatusCode from "../interfaces/http-status";
import { EhrFile, EhrFolder } from "../interfaces/ehr-fs";
import { StorageFile, StorageFolder } from "../interfaces/storage-fs";
const DEFAULT_BUCKET = process.env.MINIO_BUCKET;
const DEFAULT_INDEX = process.env.ELASTICSEARCH_INDEX;
@ -38,7 +38,7 @@ export class CabinetController extends Controller {
"เกิดข้อผิดพลาด ไม่สามารถแสดงรายการตู้เอกสารได้ กรุณาลองใหม่ในภายหลัง",
)
@SuccessResponse(HttpStatusCode.OK, "สำเร็จ")
public async listCabinet(): Promise<EhrFolder[]> {
public async listCabinet(): Promise<StorageFolder[]> {
const list = await listFolder(DEFAULT_BUCKET!).catch((e) =>
console.error(`Error List Folder: ${e}`),
);
@ -94,7 +94,7 @@ export class CabinetController extends Controller {
return await minioClient.removeObject(DEFAULT_BUCKET!, current.name);
}
const search = await esClient.search<EhrFile & { attachment: Record<string, string> }>({
const search = await esClient.search<StorageFile & { attachment: Record<string, string> }>({
index: DEFAULT_INDEX!,
query: { match: { pathname: current.name } },
});