-
Notifications
You must be signed in to change notification settings - Fork 53
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
base: main
Are you sure you want to change the base?
update endpoint implemented #110
Conversation
There was a problem hiding this 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.
src/app/components/Asset/Asset.tsx
Outdated
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); | ||
}) |
There was a problem hiding this comment.
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.
src/app/components/Asset/Asset.tsx
Outdated
import { SeededAsset, SeedTypeEnum } from "@pieces.app/pieces-os-client"; | ||
import { Application } from "@pieces.app/pieces-os-client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also.
src/app/components/Asset/Asset.tsx
Outdated
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); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @Arindam200
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this 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
There was a problem hiding this 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.
it's also happening for other input fields, should I update them too? |
Yes you can |
There was a problem hiding this 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 👍
yes! i have used 2 space tabs |
Description
This PR fixes #