Browse Source

Resolving all the trailing slash issues

Kirk Trombley 5 years ago
parent
commit
94cf81dc35
4 changed files with 4 additions and 4 deletions
  1. 1 1
      README.md
  2. 1 1
      client/src/domain/apiMethods.js
  3. 1 1
      server/app/api/game.py
  4. 1 1
      server/app/api/other.py

+ 1 - 1
README.md

@@ -6,7 +6,7 @@
 
 ```
 API Endpoints
-GET /
+GET /health
     Returns 200 and {
         "version": string,
         "status": string

+ 1 - 1
client/src/domain/apiMethods.js

@@ -2,7 +2,7 @@ const API_BASE = process.env.REACT_APP_API_BASE;
 
 export const getStatus = async () => {
     try {
-        const res = await fetch(API_BASE);
+        const res = await fetch(`${API_BASE}/health`);
         if (!res.ok) {
             throw Error(res.statusText);
         }

+ 1 - 1
server/app/api/game.py

@@ -26,7 +26,7 @@ class GuessResult(CamelModel):
     total_score: int
 
 
-@router.put("/")
+@router.put("")
 def create_game(config: GameConfig, bg: BackgroundTasks, db: Session = Depends(get_db)):
     coords = generate_points(config)
     game_id = queries.create_game(db, config, coords)

+ 1 - 1
server/app/api/other.py

@@ -30,7 +30,7 @@ class CacheResponse(CamelModel):
     caches: List[CacheInfo]
 
 
-@router.get("/")
+@router.get("/health")
 def health():
     return { "status": "healthy", "version": "2.0" }