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
847eda33
Commit
847eda33
authored
Oct 13, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add board_path to create/update response
parent
ca171eed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
ee/app/controllers/ee/boards/boards_controller.rb
ee/app/controllers/ee/boards/boards_controller.rb
+12
-2
No files found.
ee/app/controllers/ee/boards/boards_controller.rb
View file @
847eda33
...
...
@@ -15,7 +15,8 @@ module EE
respond_to
do
|
format
|
format
.
json
do
if
board
.
valid?
render
json:
serialize_as_json
(
board
)
extra_json
=
{
board_path:
board_path
(
board
)
}
render
json:
serialize_as_json
(
board
).
merge
(
extra_json
)
else
render
json:
board
.
errors
,
status: :unprocessable_entity
end
...
...
@@ -31,7 +32,8 @@ module EE
respond_to
do
|
format
|
format
.
json
do
if
@board
.
valid?
render
json:
serialize_as_json
(
@board
)
extra_json
=
{
board_path:
board_path
(
@board
)
}
render
json:
serialize_as_json
(
@board
).
merge
(
extra_json
)
else
render
json:
@board
.
errors
,
status: :unprocessable_entity
end
...
...
@@ -75,6 +77,14 @@ module EE
end
end
def
board_path
(
board
)
if
@group
group_board_path
(
parent
,
board
)
else
project_board_path
(
parent
,
board
)
end
end
def
serialize_as_json
(
resource
)
resource
.
as_json
(
only:
[
:id
,
:name
],
...
...
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