Example #1
0
 def delete(self, todo_id):
     return STORAGE_ENGINE.remove_item(USER_ID, todo_id)
Example #2
0
 def post(self):
     return STORAGE_ENGINE.create_item(USER_ID, request.json.get('data'))
Example #3
0
 def put(self, todo_id):
     return STORAGE_ENGINE.update_item(USER_ID, todo_id, request.json)
Example #4
0
 def get(self, todo_id=None):
     if todo_id is not None:
         return STORAGE_ENGINE.get_item(USER_ID, todo_id)
     return STORAGE_ENGINE.get_items(USER_ID)
Example #5
0
 def delete(self, todo_id):
     return STORAGE_ENGINE.remove_item(USER_ID, todo_id)
Example #6
0
 def put(self, todo_id):
     return STORAGE_ENGINE.update_item(
         USER_ID, todo_id, request.json
     )
Example #7
0
 def post(self):
     return STORAGE_ENGINE.create_item(
         USER_ID, request.json.get('data')
     )
Example #8
0
 def get(self, todo_id=None):
     if todo_id is not None:
         return STORAGE_ENGINE.get_item(USER_ID, todo_id)
     return STORAGE_ENGINE.get_items(USER_ID)