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