Browse Source

Merge pull request #11 from stefan-mihaila/master

Minor fixes
feature/dockerfile-arm
Evan Feenstra 5 years ago
committed by GitHub
parent
commit
bac12d3ece
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      api/controllers/payment.ts
  2. 13
      api/hub.ts
  3. 3
      dist/api/controllers/payment.js
  4. 2
      dist/api/controllers/payment.js.map
  5. 14
      dist/api/hub.js
  6. 2
      dist/api/hub.js.map
  7. BIN
      dist/public/uploads/wolf.jpg

4
api/controllers/payment.ts

@ -6,8 +6,9 @@ import * as helpers from '../helpers'
import { success } from '../utils/res'
import * as lightning from '../utils/lightning'
import {tokenFromTerms} from '../utils/ldat'
import * as constants from '../../config/constants.json'
const constants = require(__dirname + '/../../config/constants.json');
const sendPayment = async (req, res) => {
const {
@ -107,6 +108,7 @@ const sendPayment = async (req, res) => {
success(res, jsonUtils.messageToJson(message, chat))
},
failure: (error) => {
message.update({status: constants.statuses.failed})
res.status(200);
res.json({ success: false, error });
res.end();

13
api/hub.ts

@ -135,13 +135,12 @@ const finishInviteInHub = (params, onSuccess, onFailure) => {
})
.then(res => res.json())
.then(json => {
if (json.object) {
console.log('[hub] finished invite to hub')
onSuccess(json)
} else {
console.log('[hub] fail to finish invite in hub')
onFailure(json)
}
console.log('[hub] finished invite to hub')
onSuccess(json)
})
.catch(e => {
console.log('[hub] fail to finish invite in hub')
onFailure(e)
})
}

3
dist/api/controllers/payment.js

@ -17,7 +17,7 @@ const helpers = require("../helpers");
const res_1 = require("../utils/res");
const lightning = require("../utils/lightning");
const ldat_1 = require("../utils/ldat");
const constants = require(__dirname + '/../../config/constants.json');
const constants = require("../../config/constants.json");
const sendPayment = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
const { amount, chat_id, contact_id, destination_key, media_type, muid, text, remote_text, dimensions, remote_text_map, contact_ids, } = req.body;
console.log('[send payment]', req.body);
@ -98,6 +98,7 @@ const sendPayment = (req, res) => __awaiter(void 0, void 0, void 0, function* ()
res_1.success(res, jsonUtils.messageToJson(message, chat));
}),
failure: (error) => {
message.update({ status: constants.statuses.failed });
res.status(200);
res.json({ success: false, error });
res.end();

2
dist/api/controllers/payment.js.map

File diff suppressed because one or more lines are too long

14
dist/api/hub.js

@ -130,14 +130,12 @@ const finishInviteInHub = (params, onSuccess, onFailure) => {
})
.then(res => res.json())
.then(json => {
if (json.object) {
console.log('[hub] finished invite to hub');
onSuccess(json);
}
else {
console.log('[hub] fail to finish invite in hub');
onFailure(json);
}
console.log('[hub] finished invite to hub');
onSuccess(json);
})
.catch(e => {
console.log('[hub] fail to finish invite in hub');
onFailure(e);
});
};
exports.finishInviteInHub = finishInviteInHub;

2
dist/api/hub.js.map

File diff suppressed because one or more lines are too long

BIN
dist/public/uploads/wolf.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Loading…
Cancel
Save