Browse Source

first touch for pages

master
gsd 2 weeks ago
parent
commit
dded11e45f
  1. 3
      src/main/java/app/controllers/other/ExternalVIPController.java
  2. 8
      src/main/java/app/updates/PreviewUpdater.java

3
src/main/java/app/controllers/other/ExternalVIPController.java

@ -11,6 +11,7 @@ import app.entities.VipGiveMethod;
import app.entities.VipPrice; import app.entities.VipPrice;
import app.services.db.VIPService; import app.services.db.VIPService;
import app.utils.SteamIDConverter; import app.utils.SteamIDConverter;
import jakarta.annotation.PostConstruct;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -39,9 +40,9 @@ public class ExternalVIPController {
this.vipService = vipService; this.vipService = vipService;
this.unique_set = new HashSet<>(); this.unique_set = new HashSet<>();
this.fileController = fileController; this.fileController = fileController;
setupPrices();
} }
@PostConstruct
public void setupPrices() { public void setupPrices() {
prices = new ArrayList<>(); prices = new ArrayList<>();
prices.add(new VipPrice("1 Месяц", 200, "1 ключ", fileController.getUrl("vip,VIP_1_MOUNTH"), "month", true, true, true, 10)); prices.add(new VipPrice("1 Месяц", 200, "1 ключ", fileController.getUrl("vip,VIP_1_MOUNTH"), "month", true, true, true, 10));

8
src/main/java/app/updates/PreviewUpdater.java

@ -72,10 +72,10 @@ public class PreviewUpdater extends BaseUpdater{
public String getPreview(String map) { public String getPreview(String map) {
String url; String url;
//Check dbfile //Check dbfile
try { //try {
url = fileController.getUrlWithNameAndTag(map, "map"); // url = fileController.getUrlWithNameAndTag(map, "map");
return url; // return url;
} catch (Exception ignored) {} //} catch (Exception ignored) {}
//Check jpg //Check jpg
url = preview.formatted(domain, map, "jpg"); url = preview.formatted(domain, map, "jpg");

Loading…
Cancel
Save