mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-08 07:23:10 -06:00
Self-review
This commit is contained in:
parent
b29725ab13
commit
4e0c1924a6
|
|
@ -54,7 +54,7 @@ const selectDeviceByTokenSQL = "" +
|
|||
const deleteDeviceSQL = "" +
|
||||
"DELETE FROM devices WHERE id = $1 AND localpart = $2"
|
||||
|
||||
// TODO: List devices, delete device API
|
||||
// TODO: List devices?
|
||||
|
||||
type devicesStatements struct {
|
||||
insertDeviceStmt *sql.Stmt
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func (d *Database) CreateDevice(localpart, deviceID string) (dev *authtypes.Devi
|
|||
return
|
||||
}
|
||||
|
||||
// TODO: factor out to common
|
||||
func runTransaction(db *sql.DB, fn func(txn *sql.Tx) error) (err error) {
|
||||
txn, err := db.Begin()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue