def get_bookmarks(request): # db = query(request, "db") output = "[]" if users.is_logged_in(request): output = bookmark.get_bookmarks(users.get_logged_email(request)) return HttpResponse(output)
def del_bookmark(request): # db = query(request, "db") output = "Authentication required" if users.is_logged_in(request): # email = users.get_logged_email(request, db) # query(request, "db"), output = bookmark.del_bookmark(query(request, "id")) return HttpResponse(output)
def set_bookmark(request): # db = query(request, "db") output = "Authentication required" if users.is_logged_in(request): email = users.get_logged_email(request) output = bookmark.set_bookmark(query(request, "bookmark_id"), email, query(request, "pageSerial"), query(request, "title"), query(request, "query")) return HttpResponse(output)