@runnerpro/backend 1.3.1 → 1.3.3
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.
|
@@ -20,7 +20,7 @@ const common_1 = require("@runnerpro/common");
|
|
|
20
20
|
const translation_1 = require("../translation");
|
|
21
21
|
const path_1 = __importDefault(require("path"));
|
|
22
22
|
const jimp_1 = __importDefault(require("jimp"));
|
|
23
|
-
const
|
|
23
|
+
const uuidv4_1 = require("uuidv4");
|
|
24
24
|
const fs_1 = __importDefault(require("fs"));
|
|
25
25
|
// install fonts
|
|
26
26
|
canvas_1.GlobalFonts.registerFromPath(path_1.default.join(__dirname, '../../..', 'static/fonts', 'SofiaSans-Bold.ttf'), 'SofiaSansBold');
|
|
@@ -132,7 +132,7 @@ const addShadowShareWorkoutmap = (context, useDefaultPhoto) => __awaiter(void 0,
|
|
|
132
132
|
});
|
|
133
133
|
const addImageShareWorkoutmap = (context, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
134
|
const image = yield jimp_1.default.read(data);
|
|
135
|
-
const filename2 = `share-${(0,
|
|
135
|
+
const filename2 = `share-${(0, uuidv4_1.uuid)()}.jpeg`;
|
|
136
136
|
yield image.cover(1080, 1080).writeAsync(`./uploads/${filename2}`);
|
|
137
137
|
const imagePath2 = path_1.default.join(__dirname, '../../../../uploads', filename2);
|
|
138
138
|
const image2 = yield (0, canvas_1.loadImage)(imagePath2);
|