-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
# Configuration operations | ||
|
||
import logging | ||
from ...tooling.logger_init import logger | ||
from fastapi import APIRouter | ||
|
||
from .get import get_config | ||
from .put import put_config | ||
from .delete import delete_config | ||
|
||
def init_router(logger: logging.Logger): | ||
def init_router(): | ||
|
||
router = APIRouter() | ||
base_path = '/config' | ||
|
||
op = 'GET' | ||
router.get("/", response_model=dict)(get_config) | ||
logger.debug(f'added {op} {base_path}/ ') | ||
router.get("/get", response_model=dict)(get_config) | ||
logger.debug(f'added {op} {base_path}/get ') | ||
|
||
router.get("/", response_model=dict)(get_config(logger=logger)) | ||
router.get("/get", response_model=dict)(get_config(logger=logger)) | ||
router.post("/", response_model=dict)(put_config(logger=logger)) | ||
router.post("/put", response_model=dict)(put_config(logger=logger)) | ||
router.post("/delete", response_model=dict)(delete_config(logger=logger)) | ||
op = 'POST' | ||
router.post("/", response_model=dict)(put_config) | ||
logger.debug(f'added {op} {base_path}/ ') | ||
router.post("/put", response_model=dict)(put_config) | ||
logger.debug(f'added {op} {base_path}/put ') | ||
router.post("/delete", response_model=dict)(delete_config) | ||
logger.debug(f'added {op} {base_path}/delete ') | ||
|
||
return router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Database operations | ||
|
||
import logging | ||
from ...tooling.logger_init import logger | ||
from fastapi import APIRouter | ||
|
||
def init_router(logger: logging.Logger): | ||
def init_router(): | ||
|
||
router = APIRouter() | ||
|
||
return router | ||
return router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters