Merge branch 'feature/social-post'
This commit is contained in:
commit
46171b4f24
55 files changed
+2872
-7
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""SNS도 루트 .env만 읽는다. APP_ENV=test에서는 기존 설정 규칙대로 .env를 읽지 않는다."""
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
from config.config_models import _BASE
|
||||
|
||||
|
||||
class SocialConfig(BaseSettings):
|
||||
model_config = _BASE
|
||||
SOCIAL_TOKEN_SECRET: str = ""
|
||||
SOCIAL_POSTING_ENABLED: str = "0"
|
||||
SOCIAL_APPROVAL_HOURS: int = 24
|
||||
SOCIAL_APP_ORIGIN: str = ""
|
||||
THREADS_APP_ID: str = ""
|
||||
THREADS_APP_SECRET: str = ""
|
||||
THREADS_REDIRECT_URI: str = ""
|
||||
ALIMTALK_API_KEY: str = ""
|
||||
ALIMTALK_API_SECRET: str = ""
|
||||
ALIMTALK_PROFILE_ID: str = ""
|
||||
ALIMTALK_SENDER: str = ""
|
||||
ALIMTALK_TEMPLATE_CODE: str = ""
|
||||
|
||||
|
||||
def get(name, default=""):
|
||||
return getattr(SocialConfig(), name, default) or default
|
||||
|
||||
|
||||
def required(name):
|
||||
value = get(name)
|
||||
if not value:
|
||||
raise ValueError("SOCIAL_SETTING_REQUIRED")
|
||||
return value
|
||||
Reference in new issue
Block a user