ZiB 5 hónapja
szülő
commit
3defcbc2b6
3 módosított fájl, 3 hozzáadás és 7 törlés
  1. 0 2
      app.py
  2. 1 2
      config.json
  3. 2 3
      rpc.html

+ 0 - 2
app.py

@@ -2,7 +2,6 @@ import json
 import os
 from flask import Flask, request, jsonify
 from flask_cors import CORS
-from functools import wraps
 
 _url_prefix = os.environ.get("URL_PREFIX", "room").strip("/")
 _port = os.environ.get("FLASK_PORT", "5000").strip()
@@ -25,7 +24,6 @@ GLOBAL = CONFIG['global']
 if not GLOBAL or 'taxes' not in GLOBAL or 'sales' not in GLOBAL['taxes']:
   raise ValueError('GLOBAL: Missing sales tax')
 SALES_TAX = GLOBAL['taxes']['sales']
-DEFAULT_SERVICE = next(iter(SERVICES))
 
 # Formatters
 def dollar_fmt(value: float) -> str:

+ 1 - 2
config.json

@@ -8,8 +8,7 @@
     "airbnb": {
       "name": "AirBnB",
       "taxes": {
-        "flat_tax": 4,
-        "provider_pays": true
+        "flat_tax": 4
       },
       "fees": {
         "commission": 0.03,

+ 2 - 3
rpc.html

@@ -397,7 +397,6 @@ function labelFor(key) { return FIELD_LABELS[key] || key; }
 createApp({
   setup() {
     const API_BASE = 'https://zi3.xyz/room';  // mirrors URL_PREFIX on the backend
-    const apiBase = () => API_BASE;
 
     const services = ref([]);
     const selectedService = ref('');
@@ -419,7 +418,7 @@ createApp({
 
     async function fetchServices() {
       try {
-        const res = await fetch(`${apiBase()}/services`);
+        const res = await fetch(`${API_BASE}/services`);
         const list = await res.json();
         if (Array.isArray(list) && list.length > 0) {
           services.value = list;
@@ -446,7 +445,7 @@ createApp({
       s.values = { listed: null, retail: null, net: null };
       s.details = null;
       try {
-        const url = new URL(`${apiBase()}/${endpoint}`);
+        const url = new URL(`${API_BASE}/${endpoint}`);
         url.searchParams.set('amount', s.amount);
         url.searchParams.set('service', serviceKey);
         const res = await fetch(url.toString());