From 78f5566b1e71c8a810b3cdb076d374feb96b35d1 Mon Sep 17 00:00:00 2001 From: Mihael Janjic Date: Tue, 26 May 2026 11:04:49 +0200 Subject: [PATCH] feat: v2 - dodan /info endpoint, update image tag 1.0 -> 2.0 --- app/main.py | 9 +++++++-- k8s/deployment.yaml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index a224175..b586b42 100644 --- a/app/main.py +++ b/app/main.py @@ -1,10 +1,15 @@ from fastapi import FastAPI app = FastAPI() + @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "mihaeljanjic"} + return {"message": "Pozdrav svijete! (v2)", "autor": "VAĆ _KORISNIK"} @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 63a160e..70563b4 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: priprema-za-kolokvij - image: git.fpmoz.sum.ba/mihaeljanjic/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/mihaeljanjic/priprema-za-kolokvij:2.0 ports: - containerPort: 8000 resources: