Skip to content

Commit

Permalink
Merge pull request #687 from shankari/add_sync_update_method
Browse files Browse the repository at this point in the history
Add a new method to store data synchronously
  • Loading branch information
shankari authored May 9, 2019
2 parents be197e6 + 01f788e commit f40fc5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions emission/net/api/cfc_webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ def putIntoCache():
from_phone = request.json['phone_to_server']
return usercache.sync_phone_to_server(user_uuid, from_phone)

@post('/usercache/putone')
def putIntoOneEntry():
logging.debug("Called userCache.putone with request " % request)
user_uuid=getUUID(request)
logging.debug("user_uuid %s" % user_uuid)
the_entry = request.json['the_entry']
# sync_phone_to_server requires a list, so we wrap our one entry in the list
from_phone = [the_entry]
return usercache.sync_phone_to_server(user_uuid, from_phone)

@post('/timeline/getTrips/<day>')
def getTrips(day):
logging.debug("Called timeline.getTrips/%s" % day)
Expand Down

0 comments on commit f40fc5f

Please sign in to comment.