From 8c09b52ab7879152ab4c81d7b3144eec992f72f2 Mon Sep 17 00:00:00 2001 From: iva Date: Tue, 26 May 2026 11:18:44 +0200 Subject: [PATCH] feat: v2 - dodan /info endpoint, update image tag 1.0 -> 2.0 --- app/main.py | 13 ++++++------- k8s/deployment.yaml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/main.py b/app/main.py index 03e8307..357bb75 100644 --- a/app/main.py +++ b/app/main.py @@ -4,13 +4,12 @@ app = FastAPI() @app.get("/") def root(): - return { - "message": "Pozdrav svijete!", - "autor": "iva" - } + return {"message": "Pozdrav svijete! (v2)", "autor": "iva"} @app.get("/health") def health(): - return { - "status": "ok" - } \ No newline at end of file + return {"status": "ok", "version": "2.0"} + +@app.get("/info") +def info(): + return {"servis": "priprema-za-kolokvij", "verzija": "2.0"} diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index a318301..047988f 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -21,7 +21,7 @@ spec: containers: - name: priprema-za-kolokvij - image: git.fpmoz.sum.ba/iva/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/iva/priprema-za-kolokvij:2.0 ports: - containerPort: 8000 \ No newline at end of file