Example #1
0
async def post_position(
        payload: Payload):  ## Payload from pydantic model in models.py
    r = payload.dict(
    )  ## Pydantic model parsed to dictionary with the received data from owntracks app
    d = db.update(
        r, 'viiobn6mj1pf')  ## Updates the database with the key 'viiobn6mj1pf'
    ##This string value can be modified but must be changed in the base.py and all the other fields to match
    return r
Example #2
0
async def post_position(payload: Payload):
    r = payload.dict()
    d = db.insert(r)
    return r
Example #3
0
async def post_position(payload: Payload):
    r = payload.dict()
    d = db.update(r, 'viiobn6mj1pf')
    return r