Fix add bookmark with no tags
This commit is contained in:
@@ -17,13 +17,21 @@ class PostBookmark {
|
|||||||
required this.tagNames,
|
required this.tagNames,
|
||||||
});
|
});
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> ret = {
|
||||||
"url": url,
|
"url": url,
|
||||||
"title": title,
|
"title": title,
|
||||||
"description": description,
|
"description": description,
|
||||||
"is_archived": isArchived,
|
"is_archived": isArchived,
|
||||||
"unread": unread,
|
"unread": unread,
|
||||||
"shared": shared,
|
"shared": shared,
|
||||||
|
};
|
||||||
|
if (tagNames != "") {
|
||||||
|
ret = {
|
||||||
|
...ret,
|
||||||
"tag_names": tagNames,
|
"tag_names": tagNames,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user