Skip to content

Commit 4b9b6f6

Browse files
committed
refactor(v1.0.0): v1 prefix
1 parent c73c4f5 commit 4b9b6f6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from routers import google, imagemanip
44

5+
PREFIX = "/api/v1"
6+
57
app = FastAPI()
6-
app.include_router(google.router)
7-
app.include_router(imagemanip.router)
8+
app.include_router(google.router, prefix=PREFIX)
9+
app.include_router(imagemanip.router, prefix=f"{PREFIX}/image")

build-and-push.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
2-
sudo docker build -t ghcr.io/ziro-bot/randomapi . \
3-
&& sudo docker push ghcr.io/ziro-bot/randomapi:latest
2+
sudo docker build -t ghcr.io/ziro-bot/randomapi -t ghcr.io/ziro-bot/randomapi:1.0.0 . \
3+
&& sudo docker push ghcr.io/ziro-bot/randomapi:latest \
4+
&& sudo docker push ghcr.io/ziro-bot/randomapi:1.0.0

0 commit comments

Comments
 (0)