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 @@ -2618,19 +2618,13 @@ func (w WebsiteService) GetRedirect(id uint) (res []response.NginxRedirectConfig
26182618func (w WebsiteService ) UpdateRedirectFile (req request.NginxRedirectUpdate ) (err error ) {
26192619 var (
26202620 website model.Website
2621- nginxFull dto.NginxFull
26222621 oldRewriteContent []byte
26232622 )
26242623 website , err = websiteRepo .GetFirst (repo .WithByID (req .WebsiteID ))
26252624 if err != nil {
26262625 return err
26272626 }
2628- nginxFull , err = getNginxFull (& website )
2629- if err != nil {
2630- return err
2631- }
2632- includePath := fmt .Sprintf ("/www/sites/%s/redirect/%s.conf" , website .Alias , req .Name )
2633- absolutePath := path .Join (nginxFull .Install .GetPath (), includePath )
2627+ absolutePath := path .Join (GetSitePath (website , SiteRedirectDir ), req .Name + ".conf" )
26342628 fileOp := files .NewFileOp ()
26352629 oldRewriteContent , err = fileOp .GetContent (absolutePath )
26362630 if err != nil {
You can’t perform that action at this time.
0 commit comments