fix: changed resolve endpoint contract form get to post

This commit is contained in:
Тимур Городецкий
2026-08-03 14:37:42 +05:00
parent 788e046ebe
commit e6203e7093
22 changed files with 512 additions and 22 deletions
@@ -33,12 +33,22 @@ export async function resolveRoute(
userEmail: string
): Promise<IResolvedRoute> {
const c = await client(context);
const url =
`${APPROVAL_API_BASE_URL}/api/template-routes/resolve` +
`?RequestTypeId=${requestTypeId}` +
`&UserEmail=${encodeURIComponent(userEmail)}` +
`&Status=Approval`;
const response: HttpClientResponse = await c.get(url, AadHttpClient.configurations.v1);
const url = `${APPROVAL_API_BASE_URL}/api/template-routes/resolve`;
// Эндпоинт сменился с GET (query) на POST (JSON-тело).
const response: HttpClientResponse = await c.post(url, AadHttpClient.configurations.v1, {
headers: {
'Content-Type': 'application/json',
Accept: 'application/json'
},
body: JSON.stringify({
requestTypeId,
userEmail,
projectId: null,
status: 'Approval',
fieldValues: []
})
});
if (!response.ok) {
throw new Error(`resolve: ${response.status} ${response.statusText}`);
}