Remove unused Validated field from Challenge (#1817)
Remove unused Validated field from core.Challenge
This commit is contained in:
parent
546361cf68
commit
c4197ea7df
|
@ -284,10 +284,6 @@ type Challenge struct {
|
|||
// Contains the error that occurred during challenge validation, if any
|
||||
Error *probs.ProblemDetails `json:"error,omitempty"`
|
||||
|
||||
// If successful, the time at which this challenge
|
||||
// was completed by the server.
|
||||
Validated *time.Time `json:"validated,omitempty"`
|
||||
|
||||
// A URI to which a response can be POSTed
|
||||
URI string `json:"uri"`
|
||||
|
||||
|
|
28
sa/model.go
28
sa/model.go
|
@ -47,14 +47,16 @@ type challModel struct {
|
|||
ID int64 `db:"id"`
|
||||
AuthorizationID string `db:"authorizationID"`
|
||||
|
||||
Type string `db:"type"`
|
||||
Status core.AcmeStatus `db:"status"`
|
||||
Error []byte `db:"error"`
|
||||
Validated *time.Time `db:"validated"`
|
||||
Token string `db:"token"`
|
||||
KeyAuthorization string `db:"keyAuthorization"`
|
||||
ValidationRecord []byte `db:"validationRecord"`
|
||||
AccountKey []byte `db:"accountKey"`
|
||||
Type string `db:"type"`
|
||||
Status core.AcmeStatus `db:"status"`
|
||||
Error []byte `db:"error"`
|
||||
// This field is unused, but is kept temporarily to avoid a database migration.
|
||||
// TODO(#1818): remove
|
||||
Validated *time.Time `db:"validated"`
|
||||
Token string `db:"token"`
|
||||
KeyAuthorization string `db:"keyAuthorization"`
|
||||
ValidationRecord []byte `db:"validationRecord"`
|
||||
AccountKey []byte `db:"accountKey"`
|
||||
|
||||
LockCol int64
|
||||
|
||||
|
@ -114,7 +116,6 @@ func challengeToModel(c *core.Challenge, authID string) (*challModel, error) {
|
|||
AuthorizationID: authID,
|
||||
Type: c.Type,
|
||||
Status: c.Status,
|
||||
Validated: c.Validated,
|
||||
Token: c.Token,
|
||||
KeyAuthorization: c.ProvidedKeyAuthorization,
|
||||
}
|
||||
|
@ -153,11 +154,10 @@ func challengeToModel(c *core.Challenge, authID string) (*challModel, error) {
|
|||
|
||||
func modelToChallenge(cm *challModel) (core.Challenge, error) {
|
||||
c := core.Challenge{
|
||||
ID: cm.ID,
|
||||
Type: cm.Type,
|
||||
Status: cm.Status,
|
||||
Validated: cm.Validated,
|
||||
Token: cm.Token,
|
||||
ID: cm.ID,
|
||||
Type: cm.Type,
|
||||
Status: cm.Status,
|
||||
Token: cm.Token,
|
||||
ProvidedKeyAuthorization: cm.KeyAuthorization,
|
||||
}
|
||||
if len(cm.Error) > 0 {
|
||||
|
|
Loading…
Reference in New Issue