Implement edit bookmark route

This commit is contained in:
Sascha Ißbrücker
2019-06-29 00:27:20 +02:00
parent c653206dd3
commit 37ee00077a
7 changed files with 51 additions and 12 deletions

View File

@@ -11,6 +11,15 @@ def create_bookmark(bookmark: Bookmark, current_user: User):
bookmark.owner = current_user
# Set dates
bookmark.date_added = timezone.now()
bookmark.date_modified = timezone.now()
bookmark.save()
def update_bookmark(bookmark: Bookmark):
# Update website info
_update_website_metadata(bookmark)
# Update dates
bookmark.date_modified = timezone.now()
bookmark.save()