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