fix(assist-platform): preserve literal dollar in Jersey path routes
Jersey matching expects literal $ rather than %24 in paths like corporation/$id/getCorporationDetail and assistPlatform/$id/search.
This commit is contained in:
1 parent
9b4b9b3756
commit
e2e730c07d
3 files changed
+7
-7
No files matched your search
@@ -77,7 +77,7 @@ export async function getCorporationDetailApi(
|
||||
|
||||
try {
|
||||
const res = await client
|
||||
.get(`corporation/${encodeURIComponent(normalizedId)}/getCorporationDetail`)
|
||||
.get(`corporation/${normalizedId}/getCorporationDetail`)
|
||||
.json<{ items?: CorporationDetail[] }>();
|
||||
|
||||
const detail = res.items?.[0];
|
||||
@@ -108,7 +108,7 @@ export async function searchAssistTicketsApi(
|
||||
|
||||
try {
|
||||
const res = await client
|
||||
.post(`assistPlatform/${encodeURIComponent(normalizedId)}/search`, {
|
||||
.post(`assistPlatform/${normalizedId}/search`, {
|
||||
json: { query: {} },
|
||||
})
|
||||
.json<{ items?: Array<Record<string, unknown>> }>();
|
||||
|
||||
@@ -51,7 +51,7 @@ describe("domains/assist-platform - 协助平台业务编排", () => {
|
||||
|
||||
it("getCorporationDetail 返回企业详细配置", async () => {
|
||||
const client = createMockClient(async (req) => {
|
||||
expect(req.url).toContain("corporation/%24Cxa3oOtQi2eS%24g/getCorporationDetail");
|
||||
expect(req.url).toContain("corporation/$Cxa3oOtQi2eS$g/getCorporationDetail");
|
||||
return Response.json({
|
||||
items: [
|
||||
{
|
||||
@@ -71,7 +71,7 @@ describe("domains/assist-platform - 协助平台业务编排", () => {
|
||||
|
||||
it("listAssistTickets 正确映射工单时间、申请人与授权码", async () => {
|
||||
const client = createMockClient(async (req) => {
|
||||
expect(req.url).toContain("assistPlatform/%24Cxa3oOtQi2eS%24g/search");
|
||||
expect(req.url).toContain("assistPlatform/$Cxa3oOtQi2eS$g/search");
|
||||
return Response.json({
|
||||
items: [
|
||||
{
|
||||
@@ -123,7 +123,7 @@ describe("domains/assist-platform - 协助平台业务编排", () => {
|
||||
it("generateAssistSession 管理员模式一键换取免密登录直通链接", async () => {
|
||||
const client = createMockClient(async (req) => {
|
||||
const url = req.url;
|
||||
if (url.includes("assistPlatform/%24Cxa3oOtQi2eS%24g/search") || url.includes("assistPlatform/Cxa3oOtQi2eS%24g/search")) {
|
||||
if (url.includes("assistPlatform/$Cxa3oOtQi2eS$g/search") || url.includes("assistPlatform/Cxa3oOtQi2eS$g/search")) {
|
||||
return Response.json({
|
||||
items: [{ ticketId: "ID01Xeh99QmgQn", applicant: "李志财", state: "已提供" }],
|
||||
});
|
||||
@@ -156,7 +156,7 @@ describe("domains/assist-platform - 协助平台业务编排", () => {
|
||||
it("generateAssistSession 用户模式自动定位 staffId 换取免密链接", async () => {
|
||||
const client = createMockClient(async (req) => {
|
||||
const url = req.url;
|
||||
if (url.includes("assistPlatform/%24Cxa3oOtQi2eS%24g/search") || url.includes("assistPlatform/Cxa3oOtQi2eS%24g/search")) {
|
||||
if (url.includes("assistPlatform/$Cxa3oOtQi2eS$g/search") || url.includes("assistPlatform/Cxa3oOtQi2eS$g/search")) {
|
||||
return Response.json({
|
||||
items: [{ ticketId: "ID01Xeh99QmgQn", applicant: "李志财", state: "已提供" }],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user