Skip to main content
deleted 3 characters in body
Source Link

I have the function:

    contract TaskContract {

      function deleteTask(uint256 taskId, bool isDeleted) external {
            if (taskToOwner[taskId] == msg.sender) {
                tasks[taskId].isDeleted = isDeleted;
                emit DeleteTask(taskId, isDeleted);
          }
    }

My question:

I would also likeIs it possible to add a contract owner here so that he can also delete tasks along with mapped users.

I have the function:

    contract TaskContract {

      function deleteTask(uint256 taskId, bool isDeleted) external {
            if (taskToOwner[taskId] == msg.sender) {
                tasks[taskId].isDeleted = isDeleted;
                emit DeleteTask(taskId, isDeleted);
          }
    }

My question:

I would also like to add a contract owner here so that he can also delete tasks along with mapped users.

I have the function:

    contract TaskContract {

      function deleteTask(uint256 taskId, bool isDeleted) external {
            if (taskToOwner[taskId] == msg.sender) {
                tasks[taskId].isDeleted = isDeleted;
                emit DeleteTask(taskId, isDeleted);
          }
    }

My question:

Is it possible to add a contract owner here so that he can also delete tasks along with mapped users.

Source Link

functionality for the delete

I have the function:

    contract TaskContract {

      function deleteTask(uint256 taskId, bool isDeleted) external {
            if (taskToOwner[taskId] == msg.sender) {
                tasks[taskId].isDeleted = isDeleted;
                emit DeleteTask(taskId, isDeleted);
          }
    }

My question:

I would also like to add a contract owner here so that he can also delete tasks along with mapped users.