Skip to content

update endpoint implemented#110

Open
kmaity-9563 wants to merge 5 commits into
pieces-app:mainfrom
kmaity-9563:Implement-Update-endpoint
Open

update endpoint implemented#110
kmaity-9563 wants to merge 5 commits into
pieces-app:mainfrom
kmaity-9563:Implement-Update-endpoint

Conversation

@kmaity-9563

Copy link
Copy Markdown

Description

This PR fixes #

@Arindam200 Arindam200 left a comment

Copy link
Copy Markdown
Contributor

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 thread src/app/components/Asset/Asset.tsx Outdated
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
Copy Markdown
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 thread src/app/components/Asset/Asset.tsx Outdated
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here also.

Comment thread src/app/components/Asset/Asset.tsx Outdated
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
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

@Arindam200 Arindam200 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@shivaypiece shivaypiece left a comment

Copy link
Copy Markdown
Contributor

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

@shivaypiece shivaypiece left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

Yes you can

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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