git clone [email protected]:mariogarcia-ar/tco-icp-sales-chatbot.git
cd tco-icp-sales-chatbot
# nvm install
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install v18.17.0
nvm use v18.17.0
# install packages
npm install
dfx start --background
rm -rf dist && dfx cache delete && dfx deploy
npm run generate
dfx canister call tco_icp_sales_chatbot_backend createBlog '(
"1",
record {
title = "How to promote brands";
image = "/img/blogs/1.webp";
excerpt = "When you enter into any new area of science, you almost reach";
date = "23.12.2022";
}
)'
dfx canister call tco_icp_sales_chatbot_backend showBlog '("blog4")'
dfx canister call tco_icp_sales_chatbot_backend getBlogs '()'
Success
dfx canister call tco_icp_sales_chatbot_backend updateBlog '(
"1",
record {
title = "How to promote brands updated";
image = "/img/blogs/1.webp";
excerpt = "When you enter into any new area of science, you almost reach";
date = "23.12.2022";
}
)'
Blog not found.
dfx canister call tco_icp_sales_chatbot_backend updateBlog '(
"100",
record {
title = "How to promote brands updated";
image = "/img/blogs/1.webp";
excerpt = "When you enter into any new area of science, you almost reach";
date = "23.12.2022";
}
)'
dfx canister call tco_icp_sales_chatbot_backend destroyBlog '("1")'
dfx canister call tco_icp_sales_chatbot_backend createProduct '(
"1",
record {
title = "How to promote brands";
image = "/img/products/1.webp";
price = 123.5;
}
)'
dfx canister call tco_icp_sales_chatbot_backend showProduct '("product4")'
dfx canister call tco_icp_sales_chatbot_backend getProducts '()'
Success
dfx canister call tco_icp_sales_chatbot_backend updateProduct '(
"1",
record {
title = "How to promote brands updated";
image = "/img/products/1.webp";
excerpt = "When you enter into any new area of science, you almost reach";
date = "23.12.2022";
}
)'
Product not found.
dfx canister call tco_icp_sales_chatbot_backend updateProduct '(
"100",
record {
title = "How to promote brands updated";
image = "/img/products/1.webp";
excerpt = "When you enter into any new area of science, you almost reach";
date = "23.12.2022";
}
)'
dfx canister call tco_icp_sales_chatbot_backend destroyProduct '("1")'