mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 11:36:57 +00:00
Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
ce241fa40a |
2 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ func (x xDB) Put(domain string, cert *certificate.Resource) error {
|
||||||
}
|
}
|
||||||
defer sess.Close()
|
defer sess.Close()
|
||||||
|
|
||||||
if exist, _ := sess.ID(c.Domain).Exist(); exist {
|
if exist, _ := sess.ID(c.Domain).Exist(new(Cert)); exist {
|
||||||
if _, err := sess.ID(c.Domain).Update(c); err != nil {
|
if _, err := sess.ID(c.Domain).Update(c); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ func TestSanitizeWildcardCerts(t *testing.T) {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// update existing cert
|
// update existing cert
|
||||||
assert.Error(t, certDB.Put(".wildcard.de", &certificate.Resource{
|
assert.NoError(t, certDB.Put(".wildcard.de", &certificate.Resource{
|
||||||
Domain: "*.wildcard.de",
|
Domain: "*.wildcard.de",
|
||||||
Certificate: localhost_mock_directory_certificate,
|
Certificate: localhost_mock_directory_certificate,
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue