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
dd20613c
Commit
dd20613c
authored
Mar 21, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] remove additional promise for vueresource
parent
34f689e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
app/assets/javascripts/vue_sidebar_assignees/components/no_assignee.js
...vascripts/vue_sidebar_assignees/components/no_assignee.js
+4
-2
app/assets/javascripts/vue_sidebar_assignees/components/single_assignee.js
...ripts/vue_sidebar_assignees/components/single_assignee.js
+1
-1
app/assets/javascripts/vue_sidebar_assignees/services/sidebar_assignees_service.js
...e_sidebar_assignees/services/sidebar_assignees_service.js
+4
-8
No files found.
app/assets/javascripts/vue_sidebar_assignees/components/no_assignee.js
View file @
dd20613c
...
...
@@ -7,10 +7,12 @@ export default {
methods
:
{
assignSelf
()
{
this
.
service
.
add
(
this
.
assignees
.
currentUser
.
id
).
then
((
response
)
=>
{
const
assignee
=
response
.
assignee
;
const
data
=
response
.
data
;
const
assignee
=
data
.
assignee
;
this
.
assignees
.
addUser
(
assignee
.
name
,
assignee
.
username
,
assignee
.
avatar_url
);
}).
catch
((
err
)
=>
{
console
.
log
(
'
error
'
)
console
.
log
(
err
);
console
.
log
(
'
error
'
);
});
}
},
...
...
app/assets/javascripts/vue_sidebar_assignees/components/single_assignee.js
View file @
dd20613c
...
...
@@ -5,7 +5,7 @@ export default {
},
template
:
`
<div class="value hide-collapsed">
<a class="author_link bold" :href="
user.url
">
<a class="author_link bold" :href="
'/' + user.username
">
<img width="32" class="avatar avatar-inline s32" alt="" :src="user.avatarUrl">
<span class="author">{{user.name}}</span>
<span class="username">@{{user.username}}</span>
...
...
app/assets/javascripts/vue_sidebar_assignees/services/sidebar_assignees_service.js
View file @
dd20613c
...
...
@@ -3,7 +3,6 @@ import VueResource from 'vue-resource';
require
(
'
~/vue_shared/vue_resource_interceptor
'
);
Vue
.
http
.
options
.
emulateJSON
=
true
;
Vue
.
use
(
VueResource
);
export
default
class
SidebarAssigneesService
{
...
...
@@ -13,13 +12,10 @@ export default class SidebarAssigneesService {
}
add
(
userId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
sidebarAssigneeResource
.
update
({
[
this
.
field
]:
userId
})
.
then
((
response
)
=>
{
resolve
(
JSON
.
parse
(
response
.
body
))
},
(
response
)
=>
{
reject
(
response
)
});
return
this
.
sidebarAssigneeResource
.
update
({
[
this
.
field
]:
userId
},
{
emulateJSON
:
true
});
}
}
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