File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -2597,19 +2597,13 @@ func (w WebsiteService) GetRedirect(id uint) (res []response.NginxRedirectConfig
25972597func (w WebsiteService ) UpdateRedirectFile (req request.NginxRedirectUpdate ) (err error ) {
25982598 var (
25992599 website model.Website
2600- nginxFull dto.NginxFull
26012600 oldRewriteContent []byte
26022601 )
26032602 website , err = websiteRepo .GetFirst (repo .WithByID (req .WebsiteID ))
26042603 if err != nil {
26052604 return err
26062605 }
2607- nginxFull , err = getNginxFull (& website )
2608- if err != nil {
2609- return err
2610- }
2611- includePath := fmt .Sprintf ("/www/sites/%s/redirect/%s.conf" , website .Alias , req .Name )
2612- absolutePath := path .Join (nginxFull .Install .GetPath (), includePath )
2606+ absolutePath := path .Join (GetSitePath (website , SiteRedirectDir ), req .Name + ".conf" )
26132607 fileOp := files .NewFileOp ()
26142608 oldRewriteContent , err = fileOp .GetContent (absolutePath )
26152609 if err != nil {
You can’t perform that action at this time.
0 commit comments