[feat] solution: SNS 연동 확인용 테스트 게시 기능 추가
This commit is contained in:
1 parent
d77f2aa14c
commit
921c85df25
4 files changed
+114
No files matched your search
@@ -30,6 +30,22 @@ async def account(response: Response, user: UserInfo = Depends(IsValidAccessToke
|
||||
return await service.account_state(UUID(user.user_id))
|
||||
|
||||
|
||||
class TestPost(BaseModel):
|
||||
text: str = Field(min_length=1, max_length=500)
|
||||
|
||||
|
||||
@router.post("/test-post")
|
||||
async def test_post(
|
||||
req: TestPost, response: Response, user: UserInfo = Depends(IsValidAccessToken)
|
||||
):
|
||||
"""연동 확인용 즉시 게시 — 승인 없이 바로 연결된 계정으로 올라간다."""
|
||||
private_response(response)
|
||||
try:
|
||||
return await service.test_post(UUID(user.user_id), req.text)
|
||||
except SocialError as ex:
|
||||
raise HTTPException(409, str(ex)) from ex
|
||||
|
||||
|
||||
@router.get("/place/{place_id}")
|
||||
async def list_posts(
|
||||
place_id: UUID, response: Response, user: UserInfo = Depends(IsValidAccessToken)
|
||||
|
||||
Reference in new issue
Block a user