@salesforcedevs/docs-components 0.0.7-edit → 0.0.8-edit
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,7 +4,9 @@ import { normalizeBoolean } from "dxUtils/normalizers";
|
|
|
4
4
|
|
|
5
5
|
interface ApiResponse {
|
|
6
6
|
success: boolean;
|
|
7
|
-
data?:
|
|
7
|
+
data?: {
|
|
8
|
+
content: string;
|
|
9
|
+
};
|
|
8
10
|
message?: string;
|
|
9
11
|
error?: string;
|
|
10
12
|
}
|
|
@@ -35,7 +37,7 @@ export default class EditFile extends LightningElement {
|
|
|
35
37
|
private _disabled: boolean = false;
|
|
36
38
|
|
|
37
39
|
// API Configuration
|
|
38
|
-
private static readonly FETCH_ENDPOINT = "/api/file/
|
|
40
|
+
private static readonly FETCH_ENDPOINT = "https://1208ddd77328.ngrok-free.app/api/file-retrieval/retrieve";
|
|
39
41
|
private static readonly SAVE_ENDPOINT = "/api/file/save";
|
|
40
42
|
|
|
41
43
|
get popoverClass() {
|
|
@@ -89,8 +91,8 @@ export default class EditFile extends LightningElement {
|
|
|
89
91
|
"Content-Type": "application/json",
|
|
90
92
|
},
|
|
91
93
|
body: JSON.stringify({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
source: this.source,
|
|
95
|
+
href: this.fileName
|
|
94
96
|
})
|
|
95
97
|
});
|
|
96
98
|
|
|
@@ -101,8 +103,8 @@ export default class EditFile extends LightningElement {
|
|
|
101
103
|
const data: ApiResponse = await response.json();
|
|
102
104
|
|
|
103
105
|
if (data.success && data.data !== undefined) {
|
|
104
|
-
this.fileContent = data.data;
|
|
105
|
-
this.originalContent = data.data;
|
|
106
|
+
this.fileContent = data.data.content;
|
|
107
|
+
this.originalContent = data.data.content;
|
|
106
108
|
this.errorMessage = "";
|
|
107
109
|
} else {
|
|
108
110
|
this.errorMessage = data.error || data.message || "Failed to load file content";
|