Skip to content

Commit

Permalink
new address updating operations
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 18, 2016
1 parent 1a3dba2 commit 0d1b793
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/budy/controllers/api/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ def list(self):
def show(self, key):
address = budy.Address.get(key = key, map = True)
return address

@appier.route("/api/addresses/<str:key>", "PUT", json = True)
def update(self, key):
address = budy.Address.get(key = key, rules = False)
address.apply()
address.save()
address = address.map()
return address

0 comments on commit 0d1b793

Please sign in to comment.