Hello, I would like to update my post by using velo, but when I start my code I’ve got an error Message I can not understand.
I would like to change my hashtags within a post. I made a litte program that should make this by clicking a button. Everythings works well till the update process. I get this error message “Request ID: 1615068061.33833263250173019216. Message: Not Implemented.”.
I checked the _id but it seems to be correct. Now I’m stucked.
Please can you help me to find a solution. Thank you!
Here is my code so far:
import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;
import wixWindow from ‘wix-window’ ;
$w.onReady( function () {
});
export function button1_click(event) {
searchItem()
}
async function searchItem() {
// ***** Search after Category
let category = “Karte”
let item = ( await wixData.query( ‘Blog/Categories’ ).eq( ‘label’ ,category).find()).items[ 0 ];
let res = await wixData.queryReferenced( ‘Blog/Categories’ ,item._id, ‘posts’ );
// Show unchanged itiems
console.log(res.items[ 0 ]);
// Change items - Hashtag
let queryResult = res.items[ 0 ];
queryResult.hashtags = [ “Test1”,“Test2”,“Test3” ];
// Show changed itiems
console.log(queryResult);
// Update itiems in Database
let options = {
“supressAuth” : true ,
“supressHooks” : true
};
updateHashTags(queryResult,options);
console.log( “Success” );
// Helper function
function updateHashTags (postItem,uptOptions) {
wixData.update( “Blog/Posts” , postItem, uptOptions).then( (resNew) => {
let items = resNew; //see item below
const alertSuc = $w( ‘#succMsg’ ).show();
//console.log(items);
})
. catch ( (err) => {
let errorMsg = err;
const alert = $w( ‘#errMsg’ ).show();
//$w(‘#errTxt’).show();
console.log(errorMsg);
});
}
}
Best regards
Ulrich