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