Skip to content

Commit

Permalink
added missing methods: add_route_delete and add_route_put
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Oct 29, 2024
1 parent 7ec07f1 commit b5a07ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions osbot_fast_api/api/Fast_API_Routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ def add_route(self,function, methods):
self.router.add_api_route(path=path, endpoint=function, methods=methods)
return self

def add_route_delete(self, function):
return self.add_route(function=function, methods=['DELETE'])

def add_route_get(self, function):
return self.add_route(function=function, methods=['GET'])

def add_route_post(self, function):
return self.add_route(function=function, methods=['POST'])

def add_route_put(self, function):
return self.add_route(function=function, methods=['PUT'])

def fast_api_utils(self):
return Fast_API_Utils(self.app)

Expand Down

0 comments on commit b5a07ac

Please sign in to comment.