backend-manager 3.2.65 → 3.2.67
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
|
@@ -30,8 +30,6 @@ Module.prototype.main = function () {
|
|
|
30
30
|
// Set defaults
|
|
31
31
|
const githubUser = get(self.Manager.config, 'github.user');
|
|
32
32
|
const githubKey = get(self.Manager.config, 'github.key');
|
|
33
|
-
const filePath = poster.removeDirDot(finalPost.path);
|
|
34
|
-
const fileContent = finalPost.content;
|
|
35
33
|
|
|
36
34
|
// Save to disk OR commit
|
|
37
35
|
poster.onDownload = function (meta) {
|
|
@@ -76,6 +74,10 @@ Module.prototype.main = function () {
|
|
|
76
74
|
// assistant.error(`Failed to ping google: ${e}`);
|
|
77
75
|
// }
|
|
78
76
|
|
|
77
|
+
// Set file path and content
|
|
78
|
+
const filePath = poster.removeDirDot(finalPost.path);
|
|
79
|
+
const fileContent = finalPost.content;
|
|
80
|
+
|
|
79
81
|
// Save post OR commit
|
|
80
82
|
await self.createFile(githubUser, repoInfo.user, repoInfo.name, githubKey, filePath, fileContent)
|
|
81
83
|
.then(() => {
|
|
@@ -386,6 +386,7 @@ BackendAssistant.prototype.errorify = function (e, options) {
|
|
|
386
386
|
|
|
387
387
|
// Fix code
|
|
388
388
|
options.code = newError.code || options.code;
|
|
389
|
+
options.code = parseInt(options.code);
|
|
389
390
|
options.code = isBetween(options.code, 400, 599) ? options.code : 500;
|
|
390
391
|
|
|
391
392
|
// Attach properties
|
|
@@ -453,6 +454,9 @@ BackendAssistant.prototype.respond = function(response, options) {
|
|
|
453
454
|
? true
|
|
454
455
|
: options.log;
|
|
455
456
|
|
|
457
|
+
// Fix code
|
|
458
|
+
options.code = parseInt(options.code);
|
|
459
|
+
|
|
456
460
|
// Handle error
|
|
457
461
|
const isErrorCode = isBetween(options.code, 400, 599);
|
|
458
462
|
if (
|