Beispiel #1
0
    def put(id, user, name, color):
        notebook = NotebookRepository.update(user=user,
                                             id=id,
                                             name=name,
                                             color=color)

        return jsonify({"data": notebook})
Beispiel #2
0
    def get(user):
        notebooks = NotebookRepository.getAll(user=user)

        return jsonify({"data": notebooks})
Beispiel #3
0
    def post(user, name, color):
        notebook = NotebookRepository.create(user=user, name=name, color=color)

        return jsonify({"data": notebook})
Beispiel #4
0
    def delete(id, user):
        notebook = NotebookRepository.delete(user=user, id=id)

        return jsonify({"data": notebook})