Пример #1
0
    def put(id, user, name, color):
        notebook = NotebookRepository.update(user=user,
                                             id=id,
                                             name=name,
                                             color=color)

        return jsonify({"data": notebook})
Пример #2
0
    def get(user):
        notebooks = NotebookRepository.getAll(user=user)

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

        return jsonify({"data": notebook})
Пример #4
0
    def delete(id, user):
        notebook = NotebookRepository.delete(user=user, id=id)

        return jsonify({"data": notebook})