AmplicaLabs / social-app-template

Social Application Template that uses Gateway Services
Apache License 2.0
0 stars 2 forks source link

fix: AssetsService return should use correct type #47

Closed mattheworris closed 1 month ago

mattheworris commented 1 month ago

Purpose

The goal of this PR is to fix a problem with creating new posts where the assetIds are null.

Closes #29

Solution

AssetsService, which handles the upload of assets, was returning a string[] which was being interpreted as undefined. The code was changed so that AssetsService::create() returns the UploadAssetResponse and the rest of the code can correctly interpret the assetIds and then the images will show in the posts correctly.

with @saraswatpuneet

Steps to Verify

  1. Create a new post with an attached image.
  2. Verify that the post shows in the feed with a link to the image.