Commit b40b7cab authored by Felipe Artur's avatar Felipe Artur

Fix js paths on board service to use absolute URL

parent d3b1c5ec
......@@ -7,7 +7,7 @@ class BoardService {
this.boards = Vue.resource(`${boardsEndpoint}{/id}.json`, {}, {
issues: {
method: 'GET',
url: `/boards/${boardId}/issues.json`,
url: gon.gitlab_url + `/boards/${boardId}/issues.json`,
}
});
this.lists = Vue.resource(`${listsEndpoint}{/id}`, {}, {
......@@ -16,7 +16,7 @@ class BoardService {
url: `${listsEndpoint}/generate.json`
}
});
this.issue = Vue.resource(`/boards/${boardId}/issues{/id}`, {});
this.issue = Vue.resource(gon.gitlab_url + `/boards/${boardId}/issues{/id}`, {});
this.issues = Vue.resource(`${listsEndpoint}{/id}/issues`, {}, {
bulkUpdate: {
method: 'POST',
......
......@@ -21,7 +21,7 @@ class Projects::BoardsController < Projects::ApplicationController
private
def assign_endpoint_vars
@boards_endpoint = project_boards_path(project)
@boards_endpoint = project_boards_url(project)
@bulk_issues_path = bulk_update_project_issues_path(project)
@namespace_path = project.namespace.path
@labels_endpoint = project_labels_path(project)
......
......@@ -8,7 +8,7 @@ module BoardsHelper
def board_data
{
boards_endpoint: @boards_endpoint,
lists_endpoint: board_lists_path(board),
lists_endpoint: board_lists_url(board),
board_id: board.id,
board_milestone_title: board&.milestone&.title,
disabled: "#{!can?(current_user, :admin_list, current_board_parent)}",
......
......@@ -18,8 +18,8 @@ class Groups::BoardsController < Groups::ApplicationController
end
def assign_endpoint_vars
@boards_endpoint = group_boards_path(group)
@boards_endpoint = group_boards_url(group)
@namespace_path = group.to_param
@labels_endpoint = group_labels_path(group)
@labels_endpoint = group_labels_url(group)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment