Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d03a4c9a
Commit
d03a4c9a
authored
Jan 27, 2019
by
Camil Staps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add users/:user_id/starred_projects API endpoint for projects starred by a user
parent
b74c5dbc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
lib/api/projects.rb
lib/api/projects.rb
+16
-0
No files found.
lib/api/projects.rb
View file @
d03a4c9a
...
...
@@ -115,6 +115,22 @@ module API
present_projects
load_projects
end
desc
'Get a user\'s starred projects'
do
success
Entities
::
BasicProjectDetails
end
params
do
requires
:user_id
,
type:
String
,
desc:
'The ID or username of the user'
use
:collection_params
use
:statistics_params
end
get
":user_id/starred_projects"
do
user
=
find_user
(
params
[
:user_id
])
not_found!
(
'User'
)
unless
user
starred_projects
=
StarredProjectsFinder
.
new
(
user
).
execute
(
current_user
)
present_projects
starred_projects
end
end
resource
:projects
do
...
...
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