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";
import HttpError from "../interfaces/http-error";
const DEFAULT_BUCKET = process.env.MINIO_BUCKET;
@ -42,7 +42,7 @@ export class FolderController extends Controller {
public async listFolder(
@Path() cabinetName: string,
@Path() drawerName: string,
): Promise<EhrFolder[]> {
): Promise<StorageFolder[]> {
const list = await listFolder(DEFAULT_BUCKET!, `${cabinetName}/${drawerName}`).catch((e) =>
console.error(`Error List Folder: ${e}`),
);
@ -117,7 +117,7 @@ export class FolderController 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 } },
});