Beispiel #1
0
 def delete(self, todo_id):
     return STORAGE_ENGINE.remove_item(USER_ID, todo_id)
Beispiel #2
0
 def post(self):
     return STORAGE_ENGINE.create_item(USER_ID, request.json.get('data'))
Beispiel #3
0
 def put(self, todo_id):
     return STORAGE_ENGINE.update_item(USER_ID, todo_id, request.json)
Beispiel #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)
Beispiel #5
0
 def delete(self, todo_id):
     return STORAGE_ENGINE.remove_item(USER_ID, todo_id)
Beispiel #6
0
 def put(self, todo_id):
     return STORAGE_ENGINE.update_item(
         USER_ID, todo_id, request.json
     )
Beispiel #7
0
 def post(self):
     return STORAGE_ENGINE.create_item(
         USER_ID, request.json.get('data')
     )
Beispiel #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)