backend-manager 3.2.64 → 3.2.65
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
|
@@ -27,6 +27,12 @@ Module.prototype.main = function () {
|
|
|
27
27
|
|
|
28
28
|
assistant.log(`main(): Creating post...`, repoInfo);
|
|
29
29
|
|
|
30
|
+
// Set defaults
|
|
31
|
+
const githubUser = get(self.Manager.config, 'github.user');
|
|
32
|
+
const githubKey = get(self.Manager.config, 'github.key');
|
|
33
|
+
const filePath = poster.removeDirDot(finalPost.path);
|
|
34
|
+
const fileContent = finalPost.content;
|
|
35
|
+
|
|
30
36
|
// Save to disk OR commit
|
|
31
37
|
poster.onDownload = function (meta) {
|
|
32
38
|
return new Promise(async function(resolve, reject) {
|
|
@@ -40,7 +46,7 @@ Module.prototype.main = function () {
|
|
|
40
46
|
// Save to disk
|
|
41
47
|
poster.readImage(tempPath)
|
|
42
48
|
.then(image => {
|
|
43
|
-
createFile(
|
|
49
|
+
self.createFile(githubUser, repoInfo.user, repoInfo.name, githubKey, finalPath, image)
|
|
44
50
|
.then(() => {resolve()})
|
|
45
51
|
.catch((e) => {reject(e)})
|
|
46
52
|
})
|
|
@@ -71,12 +77,7 @@ Module.prototype.main = function () {
|
|
|
71
77
|
// }
|
|
72
78
|
|
|
73
79
|
// Save post OR commit
|
|
74
|
-
|
|
75
|
-
const githubKey = get(self.Manager.config, 'github.key');
|
|
76
|
-
const filePath = poster.removeDirDot(finalPost.path);
|
|
77
|
-
const fileContent = finalPost.content;
|
|
78
|
-
|
|
79
|
-
await createFile(githubUser, repoInfo.user, repoInfo.name, githubKey, filePath, fileContent)
|
|
80
|
+
await self.createFile(githubUser, repoInfo.user, repoInfo.name, githubKey, filePath, fileContent)
|
|
80
81
|
.then(() => {
|
|
81
82
|
return resolve({data: finalPost});
|
|
82
83
|
})
|