hotfix on pki on sql error
This commit is contained in:
parent
62af54fbb8
commit
4e23987412
|
@ -32,10 +32,12 @@ func (u *User) Init(cfg *config.Config) (err error) {
|
||||||
func (u *User) GetEntry(cfg *config.Config, domains []string) (Entry cert.Entry, err error) {
|
func (u *User) GetEntry(cfg *config.Config, domains []string) (Entry cert.Entry, err error) {
|
||||||
|
|
||||||
has, err := cfg.Db.Where("domains = ?", strings.Join(domains, ",")).Where(
|
has, err := cfg.Db.Where("domains = ?", strings.Join(domains, ",")).Where(
|
||||||
"validity_end::timestamp-'? DAY'::INTERVAL >= now()", cfg.ACME.MaxDaysBefore).Where(
|
fmt.Sprintf("validity_end::timestamp-'%d DAY'::INTERVAL >= now()", cfg.ACME.MaxDaysBefore)).Where(
|
||||||
"auth_url = ?", cfg.ACME.AuthURL).Desc(
|
"auth_url = ?", cfg.ACME.AuthURL).Desc(
|
||||||
"id").Get(&Entry)
|
"id").Get(&Entry)
|
||||||
|
|
||||||
|
fmt.Println(has, err)
|
||||||
|
|
||||||
if !has {
|
if !has {
|
||||||
err = fmt.Errorf("entry doesn't exists")
|
err = fmt.Errorf("entry doesn't exists")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user