style: 合入后修 gofmt/govet 与 RegistrationView 类型检查
This commit is contained in:
@@ -302,9 +302,9 @@ func (a *App) ReceiptAck(ctx context.Context, endpointID string, req *protocol.R
|
||||
}
|
||||
var acked bool
|
||||
err = a.db.Queue.Do(ctx, func(tx *sql.Tx) error {
|
||||
res, err := tx.Exec(`UPDATE receipts SET acked = 1 WHERE receipt_id = ? AND sender_id = ? AND acked = 0`, rid, endpointID)
|
||||
if err != nil {
|
||||
return err
|
||||
res, execErr := tx.Exec(`UPDATE receipts SET acked = 1 WHERE receipt_id = ? AND sender_id = ? AND acked = 0`, rid, endpointID)
|
||||
if execErr != nil {
|
||||
return execErr
|
||||
}
|
||||
aff, _ := res.RowsAffected()
|
||||
acked = aff > 0
|
||||
|
||||
Reference in New Issue
Block a user