mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 21:49:52 +00:00
fix: #439
This commit is contained in:
parent
4b931f782e
commit
5b9e39a449
@ -47,7 +47,7 @@ type applicantOptions struct {
|
|||||||
DnsPropagationTimeout int32
|
DnsPropagationTimeout int32
|
||||||
DnsTTL int32
|
DnsTTL int32
|
||||||
DisableFollowCNAME bool
|
DisableFollowCNAME bool
|
||||||
ReplacedARIAccount string
|
ReplacedARIAcctId string
|
||||||
ReplacedARICertId string
|
ReplacedARICertId string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) {
|
|||||||
lastCertX509, _ := certcrypto.ParsePEMCertificate([]byte(lastCertificate.Certificate))
|
lastCertX509, _ := certcrypto.ParsePEMCertificate([]byte(lastCertificate.Certificate))
|
||||||
if lastCertX509 != nil {
|
if lastCertX509 != nil {
|
||||||
replacedARICertId, _ := certificate.MakeARICertID(lastCertX509)
|
replacedARICertId, _ := certificate.MakeARICertID(lastCertX509)
|
||||||
options.ReplacedARIAccount = lastCertificate.ACMEAccountUrl
|
options.ReplacedARIAcctId = lastCertificate.ACMEAccountUrl
|
||||||
options.ReplacedARICertId = replacedARICertId
|
options.ReplacedARICertId = replacedARICertId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ func apply(challengeProvider challenge.Provider, options *applicantOptions) (*Ap
|
|||||||
Domains: options.Domains,
|
Domains: options.Domains,
|
||||||
Bundle: true,
|
Bundle: true,
|
||||||
}
|
}
|
||||||
if options.ReplacedARICertId != "" && options.ReplacedARIAccount != acmeUser.Registration.URI {
|
if options.ReplacedARICertId != "" && options.ReplacedARIAcctId != acmeUser.Registration.URI {
|
||||||
certRequest.ReplacesCertID = options.ReplacedARICertId
|
certRequest.ReplacesCertID = options.ReplacedARICertId
|
||||||
}
|
}
|
||||||
certResource, err := client.Certificate.Obtain(certRequest)
|
certResource, err := client.Certificate.Obtain(certRequest)
|
||||||
|
@ -34,7 +34,7 @@ const SettingsPassword = () => {
|
|||||||
onSubmit: async (values) => {
|
onSubmit: async (values) => {
|
||||||
try {
|
try {
|
||||||
await authWithPassword(getAuthStore().record!.email, values.oldPassword);
|
await authWithPassword(getAuthStore().record!.email, values.oldPassword);
|
||||||
await saveAdmin({ password: values.newPassword });
|
await saveAdmin({ password: values.newPassword, passwordConfirm: values.confirmPassword });
|
||||||
|
|
||||||
messageApi.success(t("common.text.operation_succeeded"));
|
messageApi.success(t("common.text.operation_succeeded"));
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ export const getAuthStore = () => {
|
|||||||
return getPocketBase().authStore;
|
return getPocketBase().authStore;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const save = (data: { email: string } | { password: string }) => {
|
export const save = (data: { email: string } | { password: string; passwordConfirm: string }) => {
|
||||||
return getPocketBase()
|
return getPocketBase()
|
||||||
.collection(COLLECTION_NAME)
|
.collection(COLLECTION_NAME)
|
||||||
.update(getAuthStore().record?.id || "", data);
|
.update(getAuthStore().record?.id || "", data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user