Refactor codes
This commit is contained in:
@@ -8,13 +8,13 @@ contract TodoFeed {
|
||||
mapping(uint256 => TodoData) public todoMap;
|
||||
|
||||
struct TodoData {
|
||||
uint256 todoId; // Unique token id
|
||||
uint256 todoId;
|
||||
address owner;
|
||||
string title;
|
||||
bytes photo; // Image source encoded in uint 8 array format
|
||||
uint256 timestamp; // Uploaded time
|
||||
bool isVerified; // check if is verified, default false.
|
||||
address verifier; // verifier address
|
||||
bytes photo;
|
||||
uint256 timestamp;
|
||||
bool isVerified;
|
||||
address verifier;
|
||||
}
|
||||
|
||||
function writeTodo(string title, bytes photo) public {
|
||||
@@ -54,7 +54,7 @@ contract TodoFeed {
|
||||
todoMap[todoId].todoId,
|
||||
todoMap[todoId].owner,
|
||||
todoMap[todoId].title,
|
||||
todoMap[todoId].photo,
|
||||
todoMap[todoId].photo,
|
||||
todoMap[todoId].timestamp,
|
||||
todoMap[todoId].isVerified,
|
||||
todoMap[todoId].verifier);
|
||||
|
||||
Reference in New Issue
Block a user