Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update endpoint implemented #110

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kmaity-9563
Copy link

Description

This PR fixes #

Copy link
Contributor

@Arindam200 Arindam200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unnecessary spaces, Rest looks good.

Comment on lines 15 to 38
let _seededAsset: SeededAsset = {
application: applicationData,
format: {
fragment: {
string: { raw: data },
},
},
metadata: {
name: name
}
}

// create your seed
let _seed: Pieces.Seed = {
asset: _seededAsset,
type: SeedTypeEnum.Asset
}

console.log("here at asset seed:", _seed)

// make your api call.
new Pieces.AssetsApi().assetsCreateNewAsset({ seed: _seed }).then(_a => {
console.log("well howdy", _a);
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these unnecessary spaces.

Comment on lines 2 to 3
import { SeededAsset, SeedTypeEnum } from "@pieces.app/pieces-os-client";
import { Application } from "@pieces.app/pieces-os-client";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also.

Comment on lines 47 to 62
new Pieces.AssetsApi().assetsSnapshot({}).then(_assetList => {
for (let i = 0; i < _assetList.iterable.length; i++) {
if (_assetList.iterable[i].id == _id) {
new Pieces.AssetsApi().assetsDeleteAsset({ asset: _assetList.iterable[i].id }).then(() => console.log(_id));
}
else{
newAssetsList.push( {
else {
newAssetsList.push({
id: _assetList.iterable[i].id,
name: _assetList.iterable[i].name,
classification: _assetList.iterable[i].original.reference.classification.specific
})
}
}
window.alert("selected snippet got deleted");
setArray(newAssetsList);
})
}
window.alert("selected snippet got deleted");
setArray(newAssetsList);
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Arindam200 Arindam200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@shivaypiece shivaypiece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we haven't added UI capability to update Asset information like website/tags. So that's needs to be added to the UI for using the updateAsset endpoint. We would like to have UI elements which helps us to display the current related links / tags for the selected asset and then have an option to update them in the UI which will use the updateAsset endpoint. @kmaity-9563 @Arindam200

Copy link
Contributor

@shivaypiece shivaypiece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the input box for updating the assets to be only active when actually an asset has been selected. Right now you the API request for update still goes through even if there isn't a asset that been selected.

@kmaity-9563 kmaity-9563 requested a review from shivaypiece June 4, 2024 02:10
@kmaity-9563
Copy link
Author

Can you update the input box for updating the assets to be only active when actually an asset has been selected. Right now you the API request for update still goes through even if there isn't a asset that been selected.

it's also happening for other input fields, should I update them too?

@shivaypiece
Copy link
Contributor

Yes you can

Copy link
Collaborator

@mason-at-pieces mason-at-pieces left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kmaity-9563! Thanks for this addition.

Can you make sure that you have your tabs spaces set to only 2 and not 4? Once that is set in your IDE settings, then if you could just ensure that all your changes match the syntax of 2 space tabs 👍

@kmaity-9563
Copy link
Author

Hey @kmaity-9563! Thanks for this addition.

Can you make sure that you have your tabs spaces set to only 2 and not 4? Once that is set in your IDE settings, then if you could just ensure that all your changes match the syntax of 2 space tabs 👍

yes! i have used 2 space tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants