mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #93 from Hestia-Homes/main
removing logs from validate_token
This commit is contained in:
commit
530766151d
3 changed files with 5 additions and 6 deletions
|
|
@ -95,10 +95,6 @@ def validate_jwt_token(token: str = Depends(oauth2_scheme)):
|
||||||
|
|
||||||
|
|
||||||
async def validate_token(token: str = Depends(oauth2_scheme), request: Request = None):
|
async def validate_token(token: str = Depends(oauth2_scheme), request: Request = None):
|
||||||
logger.info("Validating token")
|
|
||||||
logger.info(token)
|
|
||||||
logger.info("Secret")
|
|
||||||
logger.info(get_settings().SECRET_KEY)
|
|
||||||
token_data = validate_jwt_token(token)
|
token_data = validate_jwt_token(token)
|
||||||
if not token_data:
|
if not token_data:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
bucket_name = get_settings().PLAN_TRIGGER_BUCKET
|
bucket_name = get_settings().PLAN_TRIGGER_BUCKET
|
||||||
plan_input = read_csv_from_s3(bucket_name=bucket_name, filepath=body.trigger_file_path)
|
plan_input = read_csv_from_s3(bucket_name=bucket_name, filepath=body.trigger_file_path)
|
||||||
print(plan_input)
|
print(plan_input)
|
||||||
|
# TODO: Add validation to the file
|
||||||
|
|
||||||
|
print("What's the token")
|
||||||
print(get_settings().EPC_AUTH_TOKEN)
|
print(get_settings().EPC_AUTH_TOKEN)
|
||||||
|
|
||||||
epc_client = EpcClient(auth_token=get_settings().EPC_AUTH_TOKEN)
|
epc_client = EpcClient(auth_token=get_settings().EPC_AUTH_TOKEN)
|
||||||
|
|
@ -38,10 +40,12 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
p.set_year_built()
|
p.set_year_built()
|
||||||
|
|
||||||
logger.info("Parsing and validating the file")
|
logger.info("Parsing and validating the file")
|
||||||
# TODO: Add validation
|
|
||||||
logger.info("properties")
|
logger.info("properties")
|
||||||
logger.info(input_properties)
|
logger.info(input_properties)
|
||||||
|
|
||||||
|
# TODO: get co-ordinates
|
||||||
|
|
||||||
logger.info("Reading in EPC data")
|
logger.info("Reading in EPC data")
|
||||||
|
|
||||||
return {"message": "Plan triggered"}
|
return {"message": "Plan triggered"}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pandas as pd
|
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
import os
|
import os
|
||||||
from model_data.BoreholeClient import BoreholeClient
|
from model_data.BoreholeClient import BoreholeClient
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue