def delete(self, id):
     try:
         task = TaskService.getTask(id)
         if task is not None:
             TaskService.deleteTask(task)
             return {"result": 'task deleted successfully'}
         raise Exception('task not found')
     except Exception as e:
         return {"error", e.message}
 def get(self, id):
     return TaskService.getTask(id).serialize, 201