Skip to content

Commit c725c79

Browse files
author
Tyler Deemer
committed
Fix transformNameIfCsp name
1 parent e2fcbaf commit c725c79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/api/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class AtelierAPI {
2424
return workspaceState.get(this.workspaceFolder + ":iris", false);
2525
}
2626

27-
private formatCspName(filename: string): string {
27+
private transformNameIfCsp(filename: string): string {
2828
// If a CSP file, change from
2929
// \csp\user\... to
3030
// csp/user/...
@@ -278,7 +278,7 @@ export class AtelierAPI {
278278
format,
279279
};
280280
}
281-
name = this.formatCspName(name);
281+
name = this.transformNameIfCsp(name);
282282
return this.request(1, "GET", `${this.ns}/doc/${name}`, params);
283283
}
284284
// api v1+
@@ -288,7 +288,7 @@ export class AtelierAPI {
288288
// v1+
289289
public putDoc(name: string, data: { enc: boolean; content: string[] }, ignoreConflict?: boolean): Promise<any> {
290290
const params = { ignoreConflict };
291-
name = this.formatCspName(name);
291+
name = this.transformNameIfCsp(name);
292292
return this.request(1, "PUT", `${this.ns}/doc/${name}`, data, params);
293293
}
294294
// v1+
@@ -330,7 +330,7 @@ export class AtelierAPI {
330330
}
331331
// v1+
332332
public actionCompile(docs: string[], flags?: string, source = false): Promise<any> {
333-
docs = docs.map((doc) => this.formatCspName(doc));
333+
docs = docs.map((doc) => this.transformNameIfCsp(doc));
334334
return this.request(1, "POST", `${this.ns}/action/compile`, docs, {
335335
flags,
336336
source,

0 commit comments

Comments
 (0)