mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-15 16:40:46 +08:00
fix: 修正语法问题
This commit is contained in:
@@ -74,7 +74,7 @@ class SearchClient:
|
|||||||
def _build_headers(
|
def _build_headers(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
token: str | None = None,
|
token: str
|
||||||
accept: str = "application/json",
|
accept: str = "application/json",
|
||||||
include_json: bool = False,
|
include_json: bool = False,
|
||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
@@ -111,7 +111,7 @@ class SearchClient:
|
|||||||
async def reply_to_comment(
|
async def reply_to_comment(
|
||||||
self,
|
self,
|
||||||
comment_id: int,
|
comment_id: int,
|
||||||
token: str | None = None,
|
token: str
|
||||||
content: str,
|
content: str,
|
||||||
captcha: str | None = None,
|
captcha: str | None = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
@@ -144,7 +144,7 @@ class SearchClient:
|
|||||||
async def reply_to_post(
|
async def reply_to_post(
|
||||||
self,
|
self,
|
||||||
post_id: int,
|
post_id: int,
|
||||||
token: str | None = None,
|
token: str
|
||||||
content: str,
|
content: str,
|
||||||
captcha: str | None = None,
|
captcha: str | None = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
@@ -178,7 +178,7 @@ class SearchClient:
|
|||||||
self,
|
self,
|
||||||
payload: dict[str, Any],
|
payload: dict[str, Any],
|
||||||
*,
|
*,
|
||||||
token: str | None = None,
|
token: str
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""Create a new post and return the detailed backend payload."""
|
"""Create a new post and return the detailed backend payload."""
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ class SearchClient:
|
|||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
body = self._ensure_dict(response.json())
|
body = self._ensure_dict(response.json())
|
||||||
logger.info("Post creation succeeded with id=%s", body.get("id"))
|
logger.info("Post creation succeeded with id=%s, token=%s", body.get("id"), token)
|
||||||
return body
|
return body
|
||||||
|
|
||||||
async def recent_posts(self, minutes: int) -> list[dict[str, Any]]:
|
async def recent_posts(self, minutes: int) -> list[dict[str, Any]]:
|
||||||
@@ -249,7 +249,7 @@ class SearchClient:
|
|||||||
*,
|
*,
|
||||||
page: int = 0,
|
page: int = 0,
|
||||||
size: int = 30,
|
size: int = 30,
|
||||||
token: str | None = None,
|
token: str
|
||||||
) -> list[dict[str, Any]]:
|
) -> list[dict[str, Any]]:
|
||||||
"""Return unread notifications for the authenticated user."""
|
"""Return unread notifications for the authenticated user."""
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ class SearchClient:
|
|||||||
self,
|
self,
|
||||||
ids: list[int],
|
ids: list[int],
|
||||||
*,
|
*,
|
||||||
token: str | None = None,
|
token: str
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Mark the provided notifications as read for the authenticated user."""
|
"""Mark the provided notifications as read for the authenticated user."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user