Skip to content

Commit

Permalink
updating asset description
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Oct 4, 2024
1 parent f8b0f20 commit 899fee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ type Enso_File
- The file on which it was called.
set_description : Text -> Enso_File
set_description self (description : Text) -> Enso_File =
asset = Existing_Enso_Asset.get_asset_reference_for self
#asset.set_description description
self
update_asset_description self description . if_not_error self

## GROUP Metadata
ICON metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,10 @@ create_datalink_from_stream_action (destination : Enso_File) (allow_existing : B
id = get_required_field "id" response expected_type=Text
Asset_Cache.update destination (Existing_Enso_Asset.new_without_metadata id title) . if_not_error <|
action_result

## PRIVATE
update_asset_description (asset : Enso_File) (description : Text) =
existing_asset = Existing_Enso_Asset.get_asset_reference_for asset
payload = JS_Object.from_pairs [["description", description]]
Asset_Cache.invalidate asset
Utils.http_request HTTP_Method.Patch existing_asset.asset_uri payload

0 comments on commit 899fee2

Please sign in to comment.