@@ -1038,7 +1038,7 @@ async function getProjects (currentUser, criteria = {}) {
1038
1038
message : `response body: ${ JSON . stringify ( res . body ) } `
1039
1039
} )
1040
1040
const result = _ . map ( res . body , ( item ) => {
1041
- return _ . pick ( item , [ 'id' , 'name' , ' invites', 'members' ] )
1041
+ return _ . extend ( _ . pick ( item , [ 'id' , 'invites' , 'members' ] ) , { name : _ . unescape ( item . name ) } )
1042
1042
} )
1043
1043
return {
1044
1044
total : Number ( _ . get ( res . headers , 'x-total' ) ) ,
@@ -1195,7 +1195,7 @@ async function getProjectById (currentUser, id) {
1195
1195
context : 'getProjectById' ,
1196
1196
message : `response body: ${ JSON . stringify ( res . body ) } `
1197
1197
} )
1198
- return _ . pick ( res . body , [ 'id' , 'name' , ' invites', 'members' ] )
1198
+ return _ . extend ( _ . pick ( res . body , [ 'id' , 'invites' , 'members' ] ) , { name : _ . unescape ( res . body . name ) } )
1199
1199
} catch ( err ) {
1200
1200
if ( err . status === HttpStatus . FORBIDDEN ) {
1201
1201
throw new errors . ForbiddenError (
@@ -1925,7 +1925,8 @@ async function createProject (currentUser, data) {
1925
1925
context : 'createProject' ,
1926
1926
message : `response body: ${ JSON . stringify ( res ) } `
1927
1927
} )
1928
- return _ . get ( res , 'body' )
1928
+ const result = _ . get ( res , 'body' )
1929
+ return _ . extend ( result , { name : _ . unescape ( _ . get ( result , 'name' ) ) } )
1929
1930
}
1930
1931
1931
1932
/**
0 commit comments