refactor: word
This commit is contained in:
parent
d8cf568206
commit
3820a05704
12 changed files with 56 additions and 56 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { EhrFile } from "../interfaces/ehr-fs";
|
||||
import { StorageFile } from "../interfaces/storage-fs";
|
||||
import esClient from "../elasticsearch";
|
||||
import minioClient from "../minio";
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ export async function handler(key: string, event: string): Promise<boolean> {
|
|||
// Get info and delete it from ElasticSearch to re-index
|
||||
async function popInfo(pathname: string) {
|
||||
const result = await esClient
|
||||
.search<EhrFile & { attachment?: Record<string, unknown> }>({
|
||||
.search<StorageFile & { attachment?: Record<string, unknown> }>({
|
||||
index: DEFAULT_INDEX!,
|
||||
query: { match: { pathname } },
|
||||
})
|
||||
|
|
@ -111,7 +111,7 @@ async function handleNotFoundRecord(
|
|||
createdBy: "n/a",
|
||||
updatedAt: new Date().toISOString(),
|
||||
updatedBy: "n/a",
|
||||
} satisfies Partial<EhrFile>;
|
||||
} satisfies Partial<StorageFile>;
|
||||
|
||||
const result = await esClient
|
||||
.index({
|
||||
|
|
@ -127,7 +127,7 @@ async function handleNotFoundRecord(
|
|||
}
|
||||
|
||||
async function handleFoundRecord(
|
||||
metadata: EhrFile,
|
||||
metadata: StorageFile,
|
||||
buffer: Buffer,
|
||||
stat: { size: number; type: string },
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue