Skip to content

Commit f92afbe

Browse files
authored
Merge pull request #743 from isc-bsaviano/master
Fix XML to UDL conversion
2 parents 4abaad7 + f5aec28 commit f92afbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export class AtelierAPI {
312312
const response = await fetch(`${proto}://${host}:${port}${path}`, {
313313
method,
314314
agent,
315-
body: ["PUT", "POST"].includes(method) ? JSON.stringify(body) : null,
315+
body: ["PUT", "POST"].includes(method) ? (typeof body !== "string" ? JSON.stringify(body) : body) : null,
316316
headers: {
317317
...headers,
318318
Cookie: cookie,
@@ -531,7 +531,7 @@ export class AtelierAPI {
531531
}
532532

533533
public cvtXmlUdl(source: string): Promise<Atelier.Response> {
534-
return this.request(1, "POST", `${this.ns}/`, source, {}, { "Content-Type": "application/xml" });
534+
return this.request(1, "POST", `${this.ns}/cvt/xml/doc`, source, {}, { "Content-Type": "application/xml" });
535535
}
536536

537537
// v2+

0 commit comments

Comments
 (0)