@runnerpro/backend 1.12.11 → 1.12.12

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.
@@ -173,12 +173,12 @@ const getConversationThumbnail = (req, res, { bucket, isClient }) => __awaiter(v
173
173
  if (!file)
174
174
  return res.status(404).send('Not found');
175
175
  const [thumbnail] = yield bucket.file(`Chat/${idVideo}-thumbnail`).download();
176
- res.writeHead(200, {
177
- 'Content-Type': 'image/jpeg',
178
- 'Content-disposition': 'inline',
179
- 'Content-Length': thumbnail.length,
176
+ res.setHeader('Cache-Control', 'public, max-age=31536000');
177
+ res.setHeader('Expires', new Date(Date.now() + 31536000).toUTCString());
178
+ res.send({
179
+ file: thumbnail.toString('base64'),
180
+ mimetype: 'image/jpeg',
180
181
  });
181
- res.end(thumbnail);
182
182
  });
183
183
  const getConversationFile = (req, res, { bucket, isClient }) => __awaiter(void 0, void 0, void 0, function* () {
184
184
  const result = yield getChatFile({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.12.11",
3
+ "version": "1.12.12",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"