refresh image on product adding
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
package fr.tetelie.crawler.web;
|
package fr.tetelie.crawler.web;
|
||||||
|
|
||||||
|
import fr.tetelie.crawler.DatabaseConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
@ -24,6 +25,8 @@ public class ProductController {
|
|||||||
Product p = new Product();
|
Product p = new Product();
|
||||||
p.setName(name);
|
p.setName(name);
|
||||||
p.setLink(link);
|
p.setLink(link);
|
||||||
|
|
||||||
|
DatabaseConfig.getInstance().updatesAllMissingImages();
|
||||||
productRepository.save(p);
|
productRepository.save(p);
|
||||||
return "redirect:/";
|
return "redirect:/";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user