@stemy/backend 5.0.4 → 5.0.6

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.
@@ -2713,6 +2713,13 @@ let AssetsController = class AssetsController {
2713
2713
  const asset = await this.getAsset("Asset", id, lazy, res);
2714
2714
  return asset.download();
2715
2715
  }
2716
+ async getMetadata(id, lazy, res) {
2717
+ const asset = await this.assetResolver.resolve(id, lazy);
2718
+ if (!asset) {
2719
+ throw new HttpError(404, `Asset with id: '${id}' not found.`);
2720
+ }
2721
+ return asset.metadata;
2722
+ }
2716
2723
  async getImageRotation(id, params, res, rotation = 0) {
2717
2724
  const asset = await this.getAsset("Image", id, params.lazy, res);
2718
2725
  if (rotation !== 0) {
@@ -2785,6 +2792,15 @@ __decorate([
2785
2792
  __metadata("design:paramtypes", [String, Boolean, Object]),
2786
2793
  __metadata("design:returntype", Promise)
2787
2794
  ], AssetsController.prototype, "getFile", null);
2795
+ __decorate([
2796
+ Get("/metadata/:id"),
2797
+ __param(0, Param("id")),
2798
+ __param(1, QueryParam("lazy")),
2799
+ __param(2, Res()),
2800
+ __metadata("design:type", Function),
2801
+ __metadata("design:paramtypes", [String, Boolean, Object]),
2802
+ __metadata("design:returntype", Promise)
2803
+ ], AssetsController.prototype, "getMetadata", null);
2788
2804
  __decorate([
2789
2805
  Get("/image/:id/:rotation"),
2790
2806
  __param(0, Param("id")),