Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
go
Commits
267806e3
Commit
267806e3
authored
Jul 29, 2018
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API query for specific golinks using the short
- GET /api/golinks/pls
parent
34623c47
Pipeline
#2758
passed with stage
in 1 minute
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
go/go/serializers.py
go/go/serializers.py
+1
-0
go/go/views.py
go/go/views.py
+1
-0
No files found.
go/go/serializers.py
View file @
267806e3
...
...
@@ -12,4 +12,5 @@ from rest_framework import serializers
class
URLSerializer
(
serializers
.
HyperlinkedModelSerializer
):
class
Meta
:
model
=
URL
lookup_field
=
'short'
fields
=
(
'destination'
,
'short'
,
'date_expires'
)
go/go/views.py
View file @
267806e3
...
...
@@ -44,6 +44,7 @@ class URLViewSet(viewsets.ModelViewSet):
"""
serializer_class
=
URLSerializer
permission_classes
=
(
URLPermission
,)
lookup_field
=
'short'
def
get_queryset
(
self
):
if
not
self
.
request
.
user
.
is_staff
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment