Browse Source

fix case

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
058e312799
  1. 6
      api/controllers/media.ts
  2. 2
      api/controllers/schemas.ts
  3. 6
      dist/api/controllers/media.js
  4. 2
      dist/api/controllers/media.js.map
  5. 2
      dist/api/controllers/schemas.js
  6. 2
      dist/api/controllers/schemas.js.map

6
api/controllers/media.ts

@ -147,7 +147,7 @@ const purchase = async (req, res) => {
chat_id,
contact_id,
amount,
mediaToken,
media_token,
} = req.body
var date = new Date();
date.setMilliseconds(0)
@ -169,14 +169,14 @@ const purchase = async (req, res) => {
const message = await models.Message.create({
sender: owner.id,
type: constants.message_types.purchase,
mediaToken: mediaToken,
mediaToken: media_token,
date: date,
createdAt: date,
updatedAt: date
})
const msg={
amount, mediaToken, id:message.id,
amount, mediaToken:media_token, id:message.id,
}
helpers.sendMessage({
chat: {...chat.dataValues, contactIds:[contact_id]},

2
api/controllers/schemas.ts

@ -18,7 +18,7 @@ const message = yup.object().shape({
const purchase = yup.object().shape({
chat_id: yup.number().required(),
contact_id: yup.number().required(),
mediaToken: yup.string().required(),
media_token: yup.string().required(),
amount: yup.number().required()
})

6
dist/api/controllers/media.js

@ -130,7 +130,7 @@ function saveMediaKeys(muid, mediaKeyMap, chatId, messageId) {
}
}
const purchase = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
const { chat_id, contact_id, amount, mediaToken, } = req.body;
const { chat_id, contact_id, amount, media_token, } = req.body;
var date = new Date();
date.setMilliseconds(0);
try {
@ -149,13 +149,13 @@ const purchase = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
const message = yield models_1.models.Message.create({
sender: owner.id,
type: constants.message_types.purchase,
mediaToken: mediaToken,
mediaToken: media_token,
date: date,
createdAt: date,
updatedAt: date
});
const msg = {
amount, mediaToken, id: message.id,
amount, mediaToken: media_token, id: message.id,
};
helpers.sendMessage({
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [contact_id] }),

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

File diff suppressed because one or more lines are too long

2
dist/api/controllers/schemas.js

@ -18,7 +18,7 @@ exports.message = message;
const purchase = yup.object().shape({
chat_id: yup.number().required(),
contact_id: yup.number().required(),
mediaToken: yup.string().required(),
media_token: yup.string().required(),
amount: yup.number().required()
});
exports.purchase = purchase;

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

@ -1 +1 @@
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../api/controllers/schemas.ts"],"names":[],"mappings":";;AAAA,2BAA0B;AAE1B;;;EAGE;AAEF,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA;AAcE,gCAAU;AAZd,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAA;AAYE,0BAAO;AAVX,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA;AAIE,4BAAQ"}
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../api/controllers/schemas.ts"],"names":[],"mappings":";;AAAA,2BAA0B;AAE1B;;;EAGE;AAEF,MAAM,UAAU,GAAG,GAAG,CAAC,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