Skip to content

Commit 0d4127c

Browse files
committed
chore:简化文档返回值传参
1 parent 2827300 commit 0d4127c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/api/cms/log.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@lindoc.validate(
2727
headers=AuthorizationSchema,
2828
query=LogQuerySearchSchema,
29-
resp=DocResponse(http_200=LogPageSchema),
29+
resp=DocResponse(r=LogPageSchema),
3030
before=LogQuerySearchSchema.offset_handler,
3131
tags=["日志"],
3232
)
@@ -59,7 +59,7 @@ def get_logs():
5959
@group_required
6060
@lindoc.validate(
6161
headers=AuthorizationSchema,
62-
resp=DocResponse(http_200=StringList),
62+
resp=DocResponse(r=StringList),
6363
tags=["日志"],
6464
)
6565
def get_users_for_log():

app/api/v1/book.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
@book_api.route("/<int:id>", methods=["GET"])
2828
@lindoc.validate(
29-
resp=DocResponse(BookNotFound, http_200=BookSchema),
29+
resp=DocResponse(BookNotFound, r=BookSchema),
3030
tags=["图书"],
3131
)
3232
def get_book(id: int):
@@ -41,7 +41,7 @@ def get_book(id: int):
4141

4242
@book_api.route("", methods=["GET"])
4343
@lindoc.validate(
44-
resp=DocResponse(http_200=BookSchemaList),
44+
resp=DocResponse(r=BookSchemaList),
4545
tags=["图书"],
4646
)
4747
def get_books():
@@ -55,7 +55,7 @@ def get_books():
5555
@book_api.route("/search", methods=["GET"])
5656
@lindoc.validate(
5757
query=BookQuerySearchSchema,
58-
resp=DocResponse(BookNotFound, http_200=BookSchemaList),
58+
resp=DocResponse(BookNotFound, r=BookSchemaList),
5959
tags=["图书"],
6060
)
6161
def search():

0 commit comments

Comments
 (0)