conradlan 3 lat temu
rodzic
commit
41f7c9d0dd

+ 25 - 0
.vscode/launch.json

@@ -0,0 +1,25 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Python: FastAPI",
+            "type": "python",
+            "request": "launch",
+            "module": "uvicorn",
+            "args": [
+                "api.main:app",
+                "--host",
+                "0.0.0.0",
+                "--port",
+                "8800",
+                "--reload",
+                "--ssl-keyfile=/etc/letsencrypt/live/api.ptt.cx/privkey.pem",
+                "--ssl-certfile=/etc/letsencrypt/live/api.ptt.cx/fullchain.pem"
+            ],
+            "jinja": true
+        }
+    ]
+}

BIN
api/__pycache__/gSlide.cpython-38.pyc


BIN
api/__pycache__/mailer.cpython-38.pyc


BIN
api/__pycache__/main.cpython-310.pyc


BIN
api/__pycache__/main.cpython-38.pyc


+ 2 - 2
api/main.py

@@ -44,13 +44,13 @@ import gSlide
 import aiofiles
 import json
 import util.user
-from routers import userRoute
+from routers import apiConrad
 #https://www.choozmo.com:8887/verify_email?code=16370312713065429 => 
 #https://video.choozmo.com/verify_email.html?code=16370312713065429
 pymysql.install_as_MySQLdb()
 
 app = FastAPI()
-app.include_router(userRoute.router)
+app.include_router(apiConrad.router)
 db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/AI_anchor?charset=utf8mb4')
 print("db loaded")
 mode = 'run'

+ 0 - 0
api/routers/__init__.py


BIN
api/routers/__pycache__/__init__.cpython-38.pyc


BIN
api/routers/__pycache__/apiConrad.cpython-38.pyc


+ 7 - 0
api/routers/apiConrad.py

@@ -0,0 +1,7 @@
+from fastapi import APIRouter
+
+from routers.endpoint.v1.linepay_ch import linepay
+
+router = APIRouter()
+router.include_router(
+    linepay.router, prefix="/payment/linepay", tags=["linepay"])

+ 0 - 0
api/routers/endpoint/__init__.py


BIN
api/routers/endpoint/__pycache__/__init__.cpython-38.pyc


+ 1 - 0
api/routers/endpoint/v1/linepay_ch

@@ -0,0 +1 @@
+Subproject commit 154e3708b95f0ed7e82a29f58ab6e07f28856782

+ 0 - 18
api/routers/userRoute.py

@@ -1,18 +0,0 @@
-from fastapi import APIRouter
-
-router = APIRouter()
-
-
-@router.get("/users/", tags=["users"])
-async def read_users():
-    return [{"username": "Rick"}, {"username": "Morty"}]
-
-
-@router.get("/users/me", tags=["users"])
-async def read_user_me():
-    return {"username": "fakecurrentuser"}
-
-
-@router.get("/users/{username}", tags=["users"])
-async def read_user(username: str):
-    return {"username": username}

BIN
api/util/__pycache__/models.cpython-38.pyc


BIN
api/util/__pycache__/swap_face.cpython-38.pyc


BIN
api/util/__pycache__/user.cpython-38.pyc


+ 1 - 1
etc/Dockerfile

@@ -28,4 +28,4 @@ RUN pip3 install ffmpy
 RUN pip3 install --upgrade google-api-python-client
 RUN pip3 install progressbar
 RUN pip3 install pysrt
-
+RUN pip3 install line-pay==0.2.0