A from-scratch atproto PDS implementation in Python (mirrors https://github.com/DavidBuchanan314/millipds)

update db with updateHandle

+5 -1
+5 -1
src/millipds/service.py
··· 379 379 handle = req_json.get("handle") 380 380 if handle is None: 381 381 raise web.HTTPBadRequest(text="missing or invalid handle") 382 - # TODO: actually validate it, and update the db!!! 382 + # TODO: actually validate it 383 383 # (I'm writing this half-baked version just so I can send firehose #identity events) 384 384 with get_db(request).new_con() as con: 385 + con.execute( 386 + "UPDATE user SET handle = ? WHERE did = ?", 387 + (handle, request["authed_did"]), 388 + ) 385 389 # TODO: refactor to avoid duplicated logic between here and apply_writes 386 390 firehose_seq = con.execute( 387 391 "SELECT IFNULL(MAX(seq), 0) + 1 FROM firehose"