(ctx context.Context, id, userID string, approvalState database.DeviceAuthCodeState)
| 1776 | } |
| 1777 | |
| 1778 | func (c *connection) UpdateDeviceAuthCode(ctx context.Context, id, userID string, approvalState database.DeviceAuthCodeState) error { |
| 1779 | res, err := c.getDB(ctx).ExecContext(ctx, "UPDATE device_auth_codes SET approval_state=$1, user_id=$2, updated_on=now() WHERE id=$3", approvalState, userID, id) |
| 1780 | return checkUpdateRow("device auth code", res, err) |
| 1781 | } |
| 1782 | |
| 1783 | func (c *connection) DeleteExpiredDeviceAuthCodes(ctx context.Context, retention time.Duration) error { |
| 1784 | _, err := c.getDB(ctx).ExecContext(ctx, "DELETE FROM device_auth_codes WHERE expires_on + $1 < now()", retention) |
nothing calls this directly
no test coverage detected