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

@ -2,7 +2,7 @@ import { Body, Controller, Post, Route, Security, SuccessResponse, Tags } from "
import HttpStatusCode from "../interfaces/http-status";
import esClient from "../elasticsearch";
import { Search } from "../interfaces/search";
import { EhrFile } from "../interfaces/ehr-fs";
import { StorageFile } from "../interfaces/storage-fs";
const DEFAULT_INDEX = process.env.ELASTICSEARCH_INDEX;
@ -14,8 +14,8 @@ export class SearchController extends Controller {
@Tags("ค้นหา")
@Security("bearerAuth")
@SuccessResponse(HttpStatusCode.OK, "สำเร็จ")
public async searchFile(@Body() search: Search): Promise<EhrFile[]> {
const result = await esClient.search<EhrFile & { attachment: Record<string, string> }>({
public async searchFile(@Body() search: Search): Promise<StorageFile[]> {
const result = await esClient.search<StorageFile & { attachment: Record<string, string> }>({
index: DEFAULT_INDEX,
query: {
bool: {