feat(est-test): 저장된 작업 통합 검색과 가져오기
- 원본 통합 검색처럼 자료 7종을 검색어로 찾고 하위 연결째 현재 공사로 가져옴 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ const { exportEstx } = require("./export-estx.cjs");
|
||||
const jdl = require("./jdl.cjs");
|
||||
const { inspectAccom } = require("./inspect-accom.cjs");
|
||||
const forms = require("./forms-store.cjs");
|
||||
const searchStore = require("./search-store.cjs");
|
||||
const base = __dirname,
|
||||
port = Number(process.env.EST_TEST_PORT || 5175),
|
||||
host = process.env.EST_TEST_HOST || "100.65.141.15";
|
||||
@@ -70,6 +71,7 @@ const allowed = new Set([
|
||||
"native-cleanup.js",
|
||||
"native-name-reg.js",
|
||||
"native-tidy.js",
|
||||
"native-multi-search.js",
|
||||
"native-issues.js",
|
||||
"native-attachments.js",
|
||||
"native-standard.js",
|
||||
@@ -163,6 +165,20 @@ const server = http.createServer(async (req, res) => {
|
||||
reply(res, 200, input ? forms.save(dataDirectory, input) : forms.read(dataDirectory));
|
||||
return;
|
||||
}
|
||||
if (req.method === "GET" && url.pathname === "/api/search") {
|
||||
const kinds = (url.searchParams.get("kinds") || "").split(",").filter(Boolean);
|
||||
reply(
|
||||
res,
|
||||
200,
|
||||
searchStore.search(
|
||||
dataDirectory,
|
||||
url.searchParams.get("q"),
|
||||
kinds,
|
||||
url.searchParams.get("exclude") || "",
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (req.method === "POST" && url.pathname === "/api/forms/delete") {
|
||||
const input = JSON.parse((await body(req)).toString("utf8"));
|
||||
reply(res, 200, forms.remove(dataDirectory, input.kind, input.name));
|
||||
|
||||
Reference in New Issue
Block a user