notion_api에서 사용하던 정보를 config.py 로 이동
This commit is contained in:
@ -12,6 +12,16 @@ class Config:
|
||||
|
||||
# 노션 API
|
||||
NOTION_API_SECRET = os.getenv('NOTION_API_SECRET')
|
||||
NOTION_API_BASE = "https://api.notion.com/v1"
|
||||
NOTION_VERSION = "2022-06-28"
|
||||
|
||||
@classmethod
|
||||
def get_notion_headers(cls):
|
||||
return {
|
||||
"Authorization": f"Bearer {cls.NOTION_API_SECRET}",
|
||||
"Notion-Version": cls.NOTION_VERSION,
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
||||
# 웹훅 서명 검증용 비밀키 (옵션)
|
||||
NOTION_WEBHOOK_SECRET = os.getenv('NOTION_WEBHOOK_SECRET', None)
|
||||
@ -58,6 +68,6 @@ class Config:
|
||||
raise EnvironmentError(err_msg)
|
||||
else:
|
||||
print("필수 항목 검증 완료")
|
||||
|
||||
|
||||
# 초기 검증 실행
|
||||
Config.validate()
|
||||
|
||||
Reference in New Issue
Block a user