Browse Source

fix

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
8b8fe49e18
  1. 10
      api/controllers/media.ts
  2. 10
      dist/api/controllers/media.js
  3. 2
      dist/api/controllers/media.js.map

10
api/controllers/media.ts

@ -265,14 +265,13 @@ const receivePurchase = async (payload) => {
message: {amount,content:'Payment Denied',mediaToken},
success: async (data) => {
console.log('purchase_deny sent')
const denyMsg = {
const denyMsg = await models.Message.create({
chatId: chat.id,
sender: owner.id,
type: constants.message_types.purchase_deny,
mediaToken: mediaToken,
date: date, createdAt: date, updatedAt: date
}
models.Message.create(denyMsg)
})
socket.sendJson({
type: 'purchase_deny',
response: jsonUtils.messageToJson(denyMsg, chat, sender)
@ -298,14 +297,13 @@ const receivePurchase = async (payload) => {
},
success: async (data) => {
console.log('purchase_accept sent!')
const acceptMsg = {
const acceptMsg = await models.Message.create({
chatId: chat.id,
sender: owner.id,
type: constants.message_types.purchase_accept,
mediaToken: theMediaToken,
date: date, createdAt: date, updatedAt: date
}
models.Message.create(acceptMsg)
})
socket.sendJson({
type: 'purchase_accept',
response: jsonUtils.messageToJson(acceptMsg, chat, sender)

10
dist/api/controllers/media.js

@ -238,14 +238,13 @@ const receivePurchase = (payload) => __awaiter(void 0, void 0, void 0, function*
message: { amount, content: 'Payment Denied', mediaToken },
success: (data) => __awaiter(void 0, void 0, void 0, function* () {
console.log('purchase_deny sent');
const denyMsg = {
const denyMsg = yield models_1.models.Message.create({
chatId: chat.id,
sender: owner.id,
type: constants.message_types.purchase_deny,
mediaToken: mediaToken,
date: date, createdAt: date, updatedAt: date
};
models_1.models.Message.create(denyMsg);
});
socket.sendJson({
type: 'purchase_deny',
response: jsonUtils.messageToJson(denyMsg, chat, sender)
@ -270,14 +269,13 @@ const receivePurchase = (payload) => __awaiter(void 0, void 0, void 0, function*
},
success: (data) => __awaiter(void 0, void 0, void 0, function* () {
console.log('purchase_accept sent!');
const acceptMsg = {
const acceptMsg = yield models_1.models.Message.create({
chatId: chat.id,
sender: owner.id,
type: constants.message_types.purchase_accept,
mediaToken: theMediaToken,
date: date, createdAt: date, updatedAt: date
};
models_1.models.Message.create(acceptMsg);
});
socket.sendJson({
type: 'purchase_accept',
response: jsonUtils.messageToJson(acceptMsg, chat, sender)

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

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save