fix: correct URL structure for weather arts

- Update the URL generation logic to reflect the new
  route format.
- Ensure that the URLs for different locales now point
to the correct weather arts resource.

This change fixes an issue where URLs could lead to
incorrect endpoints, improving the functionality of
image attachment processing.
This commit is contained in:
songtianlun 2025-04-08 15:37:26 +08:00
parent 0ff9ad4ff9
commit 1624382e37

View File

@ -88,7 +88,7 @@ class SubmitToIndexnowWorker
if art.image.attached?
urls << "#{@host}/cities/#{art.city.slug}/weather_arts/#{art.slug}"
available_locales.each do |locale|
urls << "#{@host}/#{locale}/cities/#{art.city.slug}/weather_arts/#{art.slug}"
urls << "#{@host}/#{locale}/cities/#{art.city.slug}/weather/#{art.slug}"
end
end
end