refactor: word
This commit is contained in:
parent
d8cf568206
commit
3820a05704
12 changed files with 56 additions and 56 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue