From 45d6687c8f19154335a8a1d6ab9dca60fc12f1f4 Mon Sep 17 00:00:00 2001 From: nikolahrkac Date: Tue, 26 May 2026 11:10:59 +0200 Subject: [PATCH] feat: v2 - dodan /info endpoint, update image tag 1.0 -> 2.0 --- app/main.py | 12 +++++++++--- k8s/deployment.yaml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index 28fd323..d4ea568 100644 --- a/app/main.py +++ b/app/main.py @@ -1,8 +1,10 @@ +from fastapi import FastAPI + app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "VAŠ_KORISNIK"} + return {"message": "Pozdrav svijete!", "autor": "nikolahrkac"} @app.get("/health") def health(): @@ -13,8 +15,12 @@ app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "VAŠ_KORISNIK"} + return {"message": "Pozdrav svijete!", "autor": "nikolahrkac"} @app.get("/health") def health(): - return {"status": "ok"} \ No newline at end of file + return {"status": "ok"} + +@app.get("/info") +def info(): + return {"servis": "priprema-za-kolokvij", "verzija": "2.0"} diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 844358a..b0ff4bf 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/nikolahrkac/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/nikolahrkac/priprema-za-kolokvij:2.0 ports: - containerPort: 8000 resources: