As a user, I should be able to delete the pin and also clearing from other table dependensies.
Dev Notes
Given A developer navigated to your repo
There should see a file called smashDelete.js at following location src/javascripts/components/data/smashDelete.js
this file should contain code to import dependensies as shown below
import pinData from './pinData';
import boardData from './boardData';
In this function we are trying to delete the pin with removing all the dependensies. This is example code.
const totallyRemovePin = (pin_id) => new Promise((resolve, reject) => {
pinData.deletePin(pin_id)
.then(() => {
// get all board with pin_Id
boardData.getBoardByPinId(pin_id).then((boards) => {
boards.forEach((board) => {
boardData.deleteBoard(myBoard.id);
});
resolve();
});
// delete each of the board
})
.catch((err) => reject(err));
});
User Story
As a user, I should be able to delete the pin and also clearing from other table dependensies.
Dev Notes
Given A developer navigated to your repo There should see a file called smashDelete.js at following location
src/javascripts/components/data/smashDelete.js
this file should contain code to import dependensies as shown belowIn this function we are trying to delete the pin with removing all the dependensies. This is example code.