@runnerpro/backend 1.12.13 → 1.12.14

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.
@@ -275,7 +275,6 @@ const sendFile = (req, res, { sendNotification, firebaseMessaging, isClient, buc
275
275
  [duration, thumbnail] = yield Promise.all([getVideoDuration(filePath), getThumbnailFromVideo(filePath)]);
276
276
  }
277
277
  const [{ id: idFile }] = yield (0, index_1.query)('INSERT INTO [CHAT MESSAGE] ([ID CLIENTE], [ID SENDER], [TEXT], [MIMETYPE], [DURATION], [TYPE]) VALUES (?, ?, ?, ?, ?, ?) RETURNING [ID]', [isClient ? userid : idCliente, userid, req.file.originalname, req.file.mimetype, duration || null, type || 2]);
278
- res.send({ idFile });
279
278
  const fileData = fs_1.default.readFileSync(filePath);
280
279
  const files = [];
281
280
  if (req.file.mimetype.includes('image')) {
@@ -299,6 +298,7 @@ const sendFile = (req, res, { sendNotification, firebaseMessaging, isClient, buc
299
298
  for (const file of files) {
300
299
  yield bucket.file(`Chat/${file.id}`).save(file.data);
301
300
  }
301
+ res.send({ idFile });
302
302
  fs_1.default.unlinkSync(filePath);
303
303
  if (!isClient) {
304
304
  const [cliente] = yield (0, index_1.query)('SELECT [PREFERRED LANGUAGE] FROM [CLIENTE] WHERE [ID] = ?', [idCliente]);
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAuBpD,CAAC;AA4YF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAuBpD,CAAC;AA8YF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.12.13",
3
+ "version": "1.12.14",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"