@stemy/backend 2.8.4 → 2.9.1
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.
- package/bundles/stemy-backend.umd.js +143 -106
- package/bundles/stemy-backend.umd.js.map +1 -1
- package/bundles/stemy-backend.umd.min.js +1 -1
- package/bundles/stemy-backend.umd.min.js.map +1 -1
- package/common-types.d.ts +4 -0
- package/esm2015/common-types.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/rest-controllers/assets.controller.js +21 -19
- package/esm2015/services/asset-processor.js +20 -14
- package/esm2015/services/assets.js +55 -43
- package/esm2015/services/entities/lazy-asset.js +8 -8
- package/esm2015/services/lazy-assets.js +2 -2
- package/esm2015/services/progresses.js +2 -2
- package/fesm2015/stemy-backend.js +103 -82
- package/fesm2015/stemy-backend.js.map +1 -1
- package/package.json +1 -6
- package/public_api.d.ts +1 -1
- package/rest-controllers/assets.controller.d.ts +4 -3
- package/services/asset-processor.d.ts +5 -3
- package/services/assets.d.ts +2 -1
- package/stemy-backend.metadata.json +1 -1
|
@@ -1222,25 +1222,29 @@
|
|
|
1222
1222
|
exports.AssetProcessor = AssetProcessor_1 = /** @class */ (function () {
|
|
1223
1223
|
function AssetProcessor() {
|
|
1224
1224
|
}
|
|
1225
|
-
AssetProcessor.
|
|
1225
|
+
AssetProcessor.checkTextFileType = function (type) {
|
|
1226
|
+
return type.mime.indexOf("text") >= 0 || type.mime.indexOf("xml") >= 0;
|
|
1227
|
+
};
|
|
1228
|
+
AssetProcessor.fixTextFileType = function (type, buffer) {
|
|
1229
|
+
var text = buffer.toString("utf8");
|
|
1230
|
+
if (text.indexOf("<svg") >= 0) {
|
|
1231
|
+
return { ext: "svg", mime: "image/svg+xml" };
|
|
1232
|
+
}
|
|
1233
|
+
return type;
|
|
1234
|
+
};
|
|
1235
|
+
AssetProcessor.fileTypeFromBuffer = function (buffer) {
|
|
1236
|
+
var _a;
|
|
1226
1237
|
return __awaiter$u(this, void 0, void 0, function () {
|
|
1227
|
-
var
|
|
1228
|
-
return __generator(this, function (
|
|
1229
|
-
switch (
|
|
1230
|
-
case 0:
|
|
1231
|
-
_a.trys.push([0, 2, , 3]);
|
|
1232
|
-
return [4 /*yield*/, fileType.fromBuffer(buffer)];
|
|
1238
|
+
var type;
|
|
1239
|
+
return __generator(this, function (_b) {
|
|
1240
|
+
switch (_b.label) {
|
|
1241
|
+
case 0: return [4 /*yield*/, fileType.fromBuffer(buffer)];
|
|
1233
1242
|
case 1:
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
e_1 = _a.sent();
|
|
1238
|
-
if (!mimeType) {
|
|
1239
|
-
throw "Can't determine mime type";
|
|
1243
|
+
type = ((_a = _b.sent()) !== null && _a !== void 0 ? _a : { ext: "txt", mime: "text/plain" });
|
|
1244
|
+
if (AssetProcessor_1.checkTextFileType(type)) {
|
|
1245
|
+
return [2 /*return*/, AssetProcessor_1.fixTextFileType(type, buffer)];
|
|
1240
1246
|
}
|
|
1241
|
-
|
|
1242
|
-
return [3 /*break*/, 3];
|
|
1243
|
-
case 3: return [2 /*return*/, mimeType];
|
|
1247
|
+
return [2 /*return*/, type];
|
|
1244
1248
|
}
|
|
1245
1249
|
});
|
|
1246
1250
|
});
|
|
@@ -1266,11 +1270,11 @@
|
|
|
1266
1270
|
AssetProcessor.copyImageMeta = function (buffer, metadata) {
|
|
1267
1271
|
return __awaiter$u(this, void 0, void 0, function () {
|
|
1268
1272
|
var output;
|
|
1269
|
-
return __generator(this, function (
|
|
1270
|
-
switch (
|
|
1273
|
+
return __generator(this, function (_b) {
|
|
1274
|
+
switch (_b.label) {
|
|
1271
1275
|
case 0: return [4 /*yield*/, sharp$3(buffer).rotate().toBuffer({ resolveWithObject: true })];
|
|
1272
1276
|
case 1:
|
|
1273
|
-
output =
|
|
1277
|
+
output = _b.sent();
|
|
1274
1278
|
Object.assign(metadata, output.info);
|
|
1275
1279
|
return [2 /*return*/, output.data];
|
|
1276
1280
|
}
|
|
@@ -1287,18 +1291,18 @@
|
|
|
1287
1291
|
metadata[prop] = font[prop];
|
|
1288
1292
|
});
|
|
1289
1293
|
};
|
|
1290
|
-
AssetProcessor.prototype.process = function (buffer, metadata,
|
|
1294
|
+
AssetProcessor.prototype.process = function (buffer, metadata, fileType) {
|
|
1291
1295
|
return __awaiter$u(this, void 0, void 0, function () {
|
|
1292
|
-
return __generator(this, function (
|
|
1293
|
-
switch (
|
|
1296
|
+
return __generator(this, function (_b) {
|
|
1297
|
+
switch (_b.label) {
|
|
1294
1298
|
case 0:
|
|
1295
|
-
if (!AssetProcessor_1.isImage(
|
|
1299
|
+
if (!AssetProcessor_1.isImage(fileType.mime)) return [3 /*break*/, 2];
|
|
1296
1300
|
return [4 /*yield*/, AssetProcessor_1.copyImageMeta(buffer, metadata)];
|
|
1297
1301
|
case 1:
|
|
1298
|
-
buffer =
|
|
1299
|
-
|
|
1302
|
+
buffer = _b.sent();
|
|
1303
|
+
_b.label = 2;
|
|
1300
1304
|
case 2:
|
|
1301
|
-
if (AssetProcessor_1.isFont(
|
|
1305
|
+
if (AssetProcessor_1.isFont(fileType.mime)) {
|
|
1302
1306
|
AssetProcessor_1.copyFontMeta(buffer, metadata);
|
|
1303
1307
|
}
|
|
1304
1308
|
return [2 /*return*/, buffer];
|
|
@@ -1797,59 +1801,32 @@
|
|
|
1797
1801
|
if (contentType === void 0) { contentType = null; }
|
|
1798
1802
|
if (metadata === void 0) { metadata = null; }
|
|
1799
1803
|
return __awaiter$q(this, void 0, void 0, function () {
|
|
1800
|
-
var
|
|
1801
|
-
var _this = this;
|
|
1804
|
+
var uploadStream, buffer, fileType, e_1;
|
|
1802
1805
|
return __generator(this, function (_b) {
|
|
1803
1806
|
switch (_b.label) {
|
|
1804
1807
|
case 0:
|
|
1805
|
-
extension = null;
|
|
1806
|
-
fileTypeStream = copyStream(stream);
|
|
1807
1808
|
uploadStream = copyStream(stream);
|
|
1808
|
-
|
|
1809
|
+
return [4 /*yield*/, streamToBuffer(stream)];
|
|
1809
1810
|
case 1:
|
|
1810
|
-
_b.
|
|
1811
|
-
|
|
1811
|
+
buffer = _b.sent();
|
|
1812
|
+
fileType = { ext: "", mime: contentType };
|
|
1813
|
+
_b.label = 2;
|
|
1812
1814
|
case 2:
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
extension = fileType$1.ext;
|
|
1816
|
-
return [3 /*break*/, 4];
|
|
1815
|
+
_b.trys.push([2, 4, , 5]);
|
|
1816
|
+
return [4 /*yield*/, exports.AssetProcessor.fileTypeFromBuffer(buffer)];
|
|
1817
1817
|
case 3:
|
|
1818
|
+
fileType = _b.sent();
|
|
1819
|
+
return [3 /*break*/, 5];
|
|
1820
|
+
case 4:
|
|
1818
1821
|
e_1 = _b.sent();
|
|
1819
|
-
if (!
|
|
1820
|
-
throw "Can't determine
|
|
1822
|
+
if (!fileType.mime) {
|
|
1823
|
+
throw "Can't determine mime type";
|
|
1821
1824
|
}
|
|
1822
|
-
console.log("Can't determine
|
|
1823
|
-
return [3 /*break*/,
|
|
1824
|
-
case
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
metadata = Object.assign({
|
|
1828
|
-
extension: extension,
|
|
1829
|
-
downloadCount: 0,
|
|
1830
|
-
firstDownload: null,
|
|
1831
|
-
lastDownload: null
|
|
1832
|
-
}, metadata || {});
|
|
1833
|
-
metadata.filename = metadata.filename || new bson.ObjectId().toHexString();
|
|
1834
|
-
return [2 /*return*/, new Promise((function (resolve, reject) {
|
|
1835
|
-
var uploaderStream = _this.bucket.openUploadStream(metadata.filename);
|
|
1836
|
-
uploadStream.pipe(uploaderStream)
|
|
1837
|
-
.on("error", function (error) {
|
|
1838
|
-
reject(error.message || error);
|
|
1839
|
-
})
|
|
1840
|
-
.on("finish", function () {
|
|
1841
|
-
var asset = new Asset(uploaderStream.id, {
|
|
1842
|
-
filename: metadata.filename,
|
|
1843
|
-
contentType: contentType,
|
|
1844
|
-
metadata: metadata
|
|
1845
|
-
}, _this.collection, _this.bucket);
|
|
1846
|
-
asset.save().then(function () {
|
|
1847
|
-
resolve(asset);
|
|
1848
|
-
}, function (error) {
|
|
1849
|
-
reject(error.message || error);
|
|
1850
|
-
});
|
|
1851
|
-
});
|
|
1852
|
-
}))];
|
|
1825
|
+
console.log("Can't determine mime type", e_1);
|
|
1826
|
+
return [3 /*break*/, 5];
|
|
1827
|
+
case 5:
|
|
1828
|
+
metadata = metadata || {};
|
|
1829
|
+
return [2 /*return*/, this.upload(uploadStream, fileType, metadata)];
|
|
1853
1830
|
}
|
|
1854
1831
|
});
|
|
1855
1832
|
});
|
|
@@ -1858,16 +1835,31 @@
|
|
|
1858
1835
|
if (metadata === void 0) { metadata = null; }
|
|
1859
1836
|
if (contentType === void 0) { contentType = null; }
|
|
1860
1837
|
return __awaiter$q(this, void 0, void 0, function () {
|
|
1838
|
+
var fileType, e_2;
|
|
1861
1839
|
return __generator(this, function (_b) {
|
|
1862
1840
|
switch (_b.label) {
|
|
1863
|
-
case 0:
|
|
1841
|
+
case 0:
|
|
1842
|
+
fileType = { ext: "", mime: contentType };
|
|
1843
|
+
_b.label = 1;
|
|
1864
1844
|
case 1:
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
return [4 /*yield*/, this.assetProcessor.process(buffer, metadata, contentType)];
|
|
1845
|
+
_b.trys.push([1, 3, , 4]);
|
|
1846
|
+
return [4 /*yield*/, exports.AssetProcessor.fileTypeFromBuffer(buffer)];
|
|
1868
1847
|
case 2:
|
|
1848
|
+
fileType = _b.sent();
|
|
1849
|
+
return [3 /*break*/, 4];
|
|
1850
|
+
case 3:
|
|
1851
|
+
e_2 = _b.sent();
|
|
1852
|
+
if (!fileType.mime) {
|
|
1853
|
+
throw "Can't determine mime type";
|
|
1854
|
+
}
|
|
1855
|
+
console.log("Can't determine mime type", e_2);
|
|
1856
|
+
return [3 /*break*/, 4];
|
|
1857
|
+
case 4:
|
|
1858
|
+
metadata = metadata || {};
|
|
1859
|
+
return [4 /*yield*/, this.assetProcessor.process(buffer, metadata, fileType)];
|
|
1860
|
+
case 5:
|
|
1869
1861
|
buffer = _b.sent();
|
|
1870
|
-
return [2 /*return*/, this.
|
|
1862
|
+
return [2 /*return*/, this.upload(bufferToStream(buffer), fileType, metadata)];
|
|
1871
1863
|
}
|
|
1872
1864
|
});
|
|
1873
1865
|
});
|
|
@@ -1889,7 +1881,7 @@
|
|
|
1889
1881
|
Assets.prototype.read = function (id) {
|
|
1890
1882
|
return __awaiter$q(this, void 0, void 0, function () {
|
|
1891
1883
|
return __generator(this, function (_b) {
|
|
1892
|
-
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
1884
|
+
return [2 /*return*/, !id ? null : this.find({ _id: new bson.ObjectId(id) })];
|
|
1893
1885
|
});
|
|
1894
1886
|
});
|
|
1895
1887
|
};
|
|
@@ -1909,7 +1901,7 @@
|
|
|
1909
1901
|
Assets.prototype.findMany = function (where) {
|
|
1910
1902
|
return __awaiter$q(this, void 0, void 0, function () {
|
|
1911
1903
|
var cursor, items, result, items_1, items_1_1, item;
|
|
1912
|
-
var
|
|
1904
|
+
var e_3, _b;
|
|
1913
1905
|
return __generator(this, function (_c) {
|
|
1914
1906
|
switch (_c.label) {
|
|
1915
1907
|
case 0:
|
|
@@ -1926,12 +1918,12 @@
|
|
|
1926
1918
|
result.push(new Asset(item._id, item, this.collection, this.bucket));
|
|
1927
1919
|
}
|
|
1928
1920
|
}
|
|
1929
|
-
catch (
|
|
1921
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1930
1922
|
finally {
|
|
1931
1923
|
try {
|
|
1932
1924
|
if (items_1_1 && !items_1_1.done && (_b = items_1.return)) _b.call(items_1);
|
|
1933
1925
|
}
|
|
1934
|
-
finally { if (
|
|
1926
|
+
finally { if (e_3) throw e_3.error; }
|
|
1935
1927
|
}
|
|
1936
1928
|
return [2 /*return*/, result];
|
|
1937
1929
|
}
|
|
@@ -1953,6 +1945,42 @@
|
|
|
1953
1945
|
});
|
|
1954
1946
|
});
|
|
1955
1947
|
};
|
|
1948
|
+
Assets.prototype.upload = function (stream, fileType, metadata) {
|
|
1949
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1950
|
+
var contentType, extension;
|
|
1951
|
+
var _this = this;
|
|
1952
|
+
return __generator(this, function (_b) {
|
|
1953
|
+
contentType = fileType.mime.trim();
|
|
1954
|
+
extension = (fileType.ext || "").trim();
|
|
1955
|
+
metadata = Object.assign({
|
|
1956
|
+
extension: extension,
|
|
1957
|
+
downloadCount: 0,
|
|
1958
|
+
firstDownload: null,
|
|
1959
|
+
lastDownload: null
|
|
1960
|
+
}, metadata || {});
|
|
1961
|
+
metadata.filename = metadata.filename || new bson.ObjectId().toHexString();
|
|
1962
|
+
return [2 /*return*/, new Promise((function (resolve, reject) {
|
|
1963
|
+
var uploaderStream = _this.bucket.openUploadStream(metadata.filename);
|
|
1964
|
+
stream.pipe(uploaderStream)
|
|
1965
|
+
.on("error", function (error) {
|
|
1966
|
+
reject(error.message || error);
|
|
1967
|
+
})
|
|
1968
|
+
.on("finish", function () {
|
|
1969
|
+
var asset = new Asset(uploaderStream.id, {
|
|
1970
|
+
filename: metadata.filename,
|
|
1971
|
+
contentType: contentType,
|
|
1972
|
+
metadata: metadata
|
|
1973
|
+
}, _this.collection, _this.bucket);
|
|
1974
|
+
asset.save().then(function () {
|
|
1975
|
+
resolve(asset);
|
|
1976
|
+
}, function (error) {
|
|
1977
|
+
reject(error.message || error);
|
|
1978
|
+
});
|
|
1979
|
+
});
|
|
1980
|
+
}))];
|
|
1981
|
+
});
|
|
1982
|
+
});
|
|
1983
|
+
};
|
|
1956
1984
|
return Assets;
|
|
1957
1985
|
}());
|
|
1958
1986
|
exports.Assets = __decorate$t([
|
|
@@ -2046,13 +2074,13 @@
|
|
|
2046
2074
|
this.load().then(function () {
|
|
2047
2075
|
if (_this.deleted)
|
|
2048
2076
|
return;
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2077
|
+
_this.progresses.get(_this.progressId).then(function (p) {
|
|
2078
|
+
p === null || p === void 0 ? void 0 : p.cancel();
|
|
2079
|
+
});
|
|
2080
|
+
_this.startWorkingOnAsset().then(function () {
|
|
2081
|
+
console.log("Started working on lazy asset: " + _this.id);
|
|
2082
|
+
}).catch(function (reason) {
|
|
2083
|
+
console.log("Can't start working on lazy asset: " + _this.id + "\nReason: " + reason);
|
|
2056
2084
|
});
|
|
2057
2085
|
});
|
|
2058
2086
|
};
|
|
@@ -2875,7 +2903,7 @@
|
|
|
2875
2903
|
Progresses.prototype.get = function (id) {
|
|
2876
2904
|
return __awaiter$m(this, void 0, void 0, function () {
|
|
2877
2905
|
return __generator(this, function (_a) {
|
|
2878
|
-
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
2906
|
+
return [2 /*return*/, !id ? null : this.find({ _id: new bson.ObjectId(id) })];
|
|
2879
2907
|
});
|
|
2880
2908
|
});
|
|
2881
2909
|
};
|
|
@@ -3008,7 +3036,7 @@
|
|
|
3008
3036
|
LazyAssets.prototype.read = function (id) {
|
|
3009
3037
|
return __awaiter$l(this, void 0, void 0, function () {
|
|
3010
3038
|
return __generator(this, function (_a) {
|
|
3011
|
-
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
3039
|
+
return [2 /*return*/, !id ? null : this.find({ _id: new bson.ObjectId(id) })];
|
|
3012
3040
|
});
|
|
3013
3041
|
});
|
|
3014
3042
|
};
|
|
@@ -4546,36 +4574,42 @@
|
|
|
4546
4574
|
});
|
|
4547
4575
|
});
|
|
4548
4576
|
};
|
|
4549
|
-
AssetsController.prototype.getImageRotation = function (id, params, rotation) {
|
|
4577
|
+
AssetsController.prototype.getImageRotation = function (id, params, res, rotation) {
|
|
4550
4578
|
if (rotation === void 0) { rotation = 0; }
|
|
4551
|
-
var _a;
|
|
4552
4579
|
return __awaiter$7(this, void 0, void 0, function () {
|
|
4553
4580
|
var asset;
|
|
4554
4581
|
return __generator(this, function (_c) {
|
|
4555
4582
|
switch (_c.label) {
|
|
4556
|
-
case 0: return [4 /*yield*/, this.
|
|
4583
|
+
case 0: return [4 /*yield*/, this.getAsset("Asset", id, params.lazy, res)];
|
|
4557
4584
|
case 1:
|
|
4558
4585
|
asset = _c.sent();
|
|
4559
|
-
if (!asset) {
|
|
4560
|
-
throw new routingControllers.HttpError(404, "Image with id: '" + id + "' not found.");
|
|
4561
|
-
}
|
|
4562
|
-
if ((_a = asset.metadata) === null || _a === void 0 ? void 0 : _a.classified) {
|
|
4563
|
-
throw new routingControllers.HttpError(403, "Image is classified, and can be only downloaded from a custom url.");
|
|
4564
|
-
}
|
|
4565
4586
|
params.rotation = params.rotation || rotation;
|
|
4566
4587
|
return [2 /*return*/, asset.downloadImage(params)];
|
|
4567
4588
|
}
|
|
4568
4589
|
});
|
|
4569
4590
|
});
|
|
4570
4591
|
};
|
|
4571
|
-
AssetsController.prototype.getImage = function (id, params) {
|
|
4592
|
+
AssetsController.prototype.getImage = function (id, params, res) {
|
|
4572
4593
|
return __awaiter$7(this, void 0, void 0, function () {
|
|
4573
4594
|
return __generator(this, function (_c) {
|
|
4574
|
-
return [2 /*return*/, this.getImageRotation(id, params)];
|
|
4595
|
+
return [2 /*return*/, this.getImageRotation(id, params, res)];
|
|
4575
4596
|
});
|
|
4576
4597
|
});
|
|
4577
4598
|
};
|
|
4578
4599
|
AssetsController.prototype.getFile = function (id, lazy, res) {
|
|
4600
|
+
return __awaiter$7(this, void 0, void 0, function () {
|
|
4601
|
+
var asset;
|
|
4602
|
+
return __generator(this, function (_c) {
|
|
4603
|
+
switch (_c.label) {
|
|
4604
|
+
case 0: return [4 /*yield*/, this.getAsset("Asset", id, lazy, res)];
|
|
4605
|
+
case 1:
|
|
4606
|
+
asset = _c.sent();
|
|
4607
|
+
return [2 /*return*/, asset.download()];
|
|
4608
|
+
}
|
|
4609
|
+
});
|
|
4610
|
+
});
|
|
4611
|
+
};
|
|
4612
|
+
AssetsController.prototype.getAsset = function (type, id, lazy, res) {
|
|
4579
4613
|
var _a, _b;
|
|
4580
4614
|
return __awaiter$7(this, void 0, void 0, function () {
|
|
4581
4615
|
var asset, ext;
|
|
@@ -4585,16 +4619,19 @@
|
|
|
4585
4619
|
case 1:
|
|
4586
4620
|
asset = _c.sent();
|
|
4587
4621
|
if (!asset) {
|
|
4588
|
-
throw new routingControllers.HttpError(404, "
|
|
4622
|
+
throw new routingControllers.HttpError(404, type + " with id: '" + id + "' not found.");
|
|
4589
4623
|
}
|
|
4590
4624
|
if ((_a = asset.metadata) === null || _a === void 0 ? void 0 : _a.classified) {
|
|
4591
|
-
throw new routingControllers.HttpError(403, "
|
|
4625
|
+
throw new routingControllers.HttpError(403, type + " is classified, and can be only downloaded from a custom url.");
|
|
4592
4626
|
}
|
|
4593
4627
|
ext = (_b = asset.metadata) === null || _b === void 0 ? void 0 : _b.extension;
|
|
4594
4628
|
if (ext) {
|
|
4595
4629
|
res.header("content-disposition", "inline; filename=" + asset.filename + "." + ext);
|
|
4596
4630
|
}
|
|
4597
|
-
|
|
4631
|
+
if (asset.contentType) {
|
|
4632
|
+
res.header("content-type", asset.contentType);
|
|
4633
|
+
}
|
|
4634
|
+
return [2 /*return*/, asset];
|
|
4598
4635
|
}
|
|
4599
4636
|
});
|
|
4600
4637
|
});
|
|
@@ -4619,16 +4656,16 @@
|
|
|
4619
4656
|
], AssetsController.prototype, "uploadUrl", null);
|
|
4620
4657
|
__decorate$a([
|
|
4621
4658
|
routingControllers.Get("/image/:id/:rotation"),
|
|
4622
|
-
__param$5(0, routingControllers.Param("id")), __param$5(1, routingControllers.QueryParams()), __param$5(2, routingControllers.Param("rotation")),
|
|
4659
|
+
__param$5(0, routingControllers.Param("id")), __param$5(1, routingControllers.QueryParams()), __param$5(2, routingControllers.Res()), __param$5(3, routingControllers.Param("rotation")),
|
|
4623
4660
|
__metadata$7("design:type", Function),
|
|
4624
|
-
__metadata$7("design:paramtypes", [String, Object, Number]),
|
|
4661
|
+
__metadata$7("design:paramtypes", [String, Object, Object, Number]),
|
|
4625
4662
|
__metadata$7("design:returntype", Promise)
|
|
4626
4663
|
], AssetsController.prototype, "getImageRotation", null);
|
|
4627
4664
|
__decorate$a([
|
|
4628
4665
|
routingControllers.Get("/image/:id"),
|
|
4629
|
-
__param$5(0, routingControllers.Param("id")), __param$5(1, routingControllers.QueryParams()),
|
|
4666
|
+
__param$5(0, routingControllers.Param("id")), __param$5(1, routingControllers.QueryParams()), __param$5(2, routingControllers.Res()),
|
|
4630
4667
|
__metadata$7("design:type", Function),
|
|
4631
|
-
__metadata$7("design:paramtypes", [String, Object]),
|
|
4668
|
+
__metadata$7("design:paramtypes", [String, Object, Object]),
|
|
4632
4669
|
__metadata$7("design:returntype", Promise)
|
|
4633
4670
|
], AssetsController.prototype, "getImage", null);
|
|
4634
4671
|
__decorate$a([
|