File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ const save = async () => {
141141 }
142142 }
143143
144- await domain .save (name .value , {
144+ return domain .save (name .value , {
145145 name: filename .value || name .value ,
146146 content: configText .value ,
147147 overwrite: true ,
Original file line number Diff line number Diff line change 22import { useGettext } from ' vue3-gettext'
33import { Modal , message } from ' ant-design-vue'
44import type { ComputedRef , Ref } from ' vue'
5- import template from ' @/api/template'
65import domain from ' @/api/domain'
76import AutoCertStepOne from ' @/views/domain/cert/components/AutoCertStepOne.vue'
87import type { NgxConfig , NgxDirective } from ' @/api/ngx'
@@ -82,19 +81,7 @@ function change_auto_cert(status: boolean) {
8281
8382async function onchange(status : boolean ) {
8483 if (status ) {
85- await template .get_block (' letsencrypt.conf' ).then (r => {
86- ngx_config .servers .forEach (async v => {
87- v .locations = v ?.locations ?.filter (l => l .path !== ' /.well-known/acme-challenge' )
88-
89- v .locations ?.push (... r .locations )
90- })
91- }).then (async () => {
92- // if ssl_certificate is empty, do not save, just use the config from last step.
93- if (directivesMap .value .ssl_certificate ?.[0 ])
94- await save_site_config ()
95-
96- job ()
97- })
84+ job ()
9885 }
9986 else {
10087 ngx_config .servers .forEach (v => {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import type { NgxConfig } from '@/api/ngx'
88const props = defineProps <{
99 ngxConfig: NgxConfig
1010 currentServerIdx: number
11- name: string
11+ name? : string
1212}>()
1313
1414const { $gettext } = useGettext ()
You can’t perform that action at this time.
0 commit comments