Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
79b3b377
Commit
79b3b377
authored
4 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix Transkribus endpoint names and add tags to job endpoints
parent
12e76ce3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arkindex/project/api_v1.py
+2
-2
2 additions, 2 deletions
arkindex/project/api_v1.py
arkindex/users/api.py
+9
-3
9 additions, 3 deletions
arkindex/users/api.py
arkindex/users/serializers.py
+1
-1
1 addition, 1 deletion
arkindex/users/serializers.py
with
12 additions
and
6 deletions
arkindex/project/api_v1.py
+
2
−
2
View file @
79b3b377
...
...
@@ -97,12 +97,12 @@ from arkindex.users.api import (
PasswordReset
,
PasswordResetConfirm
,
ProvidersList
,
UpdateUserTranskribus
,
UserCreate
,
UserEmailLogin
,
UserEmailVerification
,
UserMemberships
,
UserRetrieve
,
UserTranskribus
,
)
# Cache the OpenAPI schema view for a day
...
...
@@ -247,7 +247,7 @@ api = [
path
(
'
user/token/
'
,
UserEmailVerification
.
as_view
(),
name
=
'
user-token
'
),
path
(
'
user/password-reset/
'
,
PasswordReset
.
as_view
(),
name
=
'
password-reset
'
),
path
(
'
user/password-reset/confirm/
'
,
PasswordResetConfirm
.
as_view
(),
name
=
'
password-reset-confirm
'
),
path
(
'
user/transkribus/
'
,
Update
UserTranskribus
.
as_view
(),
name
=
'
user-transkribus
'
),
path
(
'
user/transkribus/
'
,
UserTranskribus
.
as_view
(),
name
=
'
user-transkribus
'
),
# Rights management
path
(
'
groups/
'
,
GroupsList
.
as_view
(),
name
=
'
groups-list
'
),
...
...
This diff is collapsed.
Click to expand it.
arkindex/users/api.py
+
9
−
3
View file @
79b3b377
...
...
@@ -47,8 +47,8 @@ from arkindex.users.serializers import (
OAuthRetrySerializer
,
PasswordResetConfirmSerializer
,
PasswordResetSerializer
,
UpdateUserTranskribusSerializer
,
UserSerializer
,
UserTranskribusSerializer
,
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -341,13 +341,13 @@ class PasswordResetConfirm(CreateAPIView):
}
class
Update
UserTranskribus
(
UpdateAPIView
):
class
UserTranskribus
(
UpdateAPIView
):
"""
Update and validate Transkribus account
Only the user
'
s email is stored in our database
"""
permission_classes
=
(
IsVerified
,
)
serializer_class
=
Update
UserTranskribusSerializer
serializer_class
=
UserTranskribusSerializer
openapi_overrides
=
{
'
tags
'
:
[
'
users
'
],
}
...
...
@@ -474,6 +474,9 @@ class JobList(ListAPIView):
"""
List asynchronous jobs linked to the current user.
"""
openapi_overrides
=
{
'
tags
'
:
[
'
jobs
'
]
}
permission_classes
=
(
IsVerified
,
)
serializer_class
=
JobSerializer
pagination_class
=
None
...
...
@@ -488,6 +491,9 @@ class JobRetrieve(RetrieveDestroyAPIView):
"""
Retrieve a single job by ID.
"""
openapi_overrides
=
{
'
tags
'
:
[
'
jobs
'
]
}
permission_classes
=
(
IsVerified
,
)
serializer_class
=
JobSerializer
...
...
This diff is collapsed.
Click to expand it.
arkindex/users/serializers.py
+
1
−
1
View file @
79b3b377
...
...
@@ -187,7 +187,7 @@ class PasswordResetConfirmSerializer(serializers.Serializer):
user
.
save
()
class
Update
UserTranskribusSerializer
(
serializers
.
Serializer
):
class
UserTranskribusSerializer
(
serializers
.
Serializer
):
"""
A serializer that allows to verify Transkribus credentials
and to save the Transkribus email
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment