From e4f834b35fd2920090eef1f1d726ec4d491cdb11 Mon Sep 17 00:00:00 2001 From: marijam1909 Date: Tue, 26 May 2026 11:04:50 +0200 Subject: [PATCH] feat: v2 - dodan /info endpoint --- app/main.py | 8 ++++++-- k8s/deployment.yaml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index cc649b8..7d45745 100644 --- a/app/main.py +++ b/app/main.py @@ -4,8 +4,12 @@ app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "marijam1909"} + return {"message": "Pozdrav svijete! (v2)", "autor": "marijam1909"} @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"} \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 9462f55..0cd717e 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: priprema-za-kolokvij - image: git.fpmoz.sum.ba/marijam1909/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/marijam1909/priprema-za-kolokvij:2.0 ports: - containerPort: 8000