Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e570a364
authored
2025-04-01 15:14:38 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
FIX:参数校验
1 parent
75e94e77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
e570a36
...
...
@@ -97,6 +97,18 @@ employee_args = {
'business_type'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
}
q_gb_file_args
=
{
'file_path'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
255
)),
'business_type'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
}
d_gb_file_args
=
{
'object_id'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'save_path'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
255
)),
'business_type'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
}
go_args
=
{
'image'
:
fields
.
Raw
(
required
=
True
),
}
...
...
@@ -1884,7 +1896,7 @@ class SearchGBHistoryFileView(GenericView):
permission_classes
=
[
IsAuthenticated
]
authentication_classes
=
[
OAuth2AuthenticationWithUser
]
@use_args
(
employe
e_args
,
location
=
'data'
)
@use_args
(
q_gb_fil
e_args
,
location
=
'data'
)
def
post
(
self
,
request
,
args
):
file_path
=
args
.
get
(
'file_path'
)
...
...
@@ -1922,7 +1934,7 @@ class DownloadGBHistoryFileView(GenericView):
permission_classes
=
[
IsAuthenticated
]
authentication_classes
=
[
OAuth2AuthenticationWithUser
]
@use_args
(
employe
e_args
,
location
=
'data'
)
@use_args
(
d_gb_fil
e_args
,
location
=
'data'
)
def
post
(
self
,
request
,
args
):
business_type
=
args
.
get
(
'business_type'
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment