@@ -1038,7 +1038,7 @@ async function getProjects (currentUser, criteria = {}) {
10381038 message : `response body: ${ JSON . stringify ( res . body ) } `
10391039 } )
10401040 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 ) } )
10421042 } )
10431043 return {
10441044 total : Number ( _ . get ( res . headers , 'x-total' ) ) ,
@@ -1195,7 +1195,7 @@ async function getProjectById (currentUser, id) {
11951195 context : 'getProjectById' ,
11961196 message : `response body: ${ JSON . stringify ( res . body ) } `
11971197 } )
1198- return _ . pick ( res . body , [ 'id' , 'name' , ' invites', 'members' ] )
1198+ return _ . extend ( _ . pick ( res . body , [ 'id' , 'invites' , 'members' ] ) , { name : _ . unescape ( res . body . name ) } )
11991199 } catch ( err ) {
12001200 if ( err . status === HttpStatus . FORBIDDEN ) {
12011201 throw new errors . ForbiddenError (
@@ -1925,7 +1925,8 @@ async function createProject (currentUser, data) {
19251925 context : 'createProject' ,
19261926 message : `response body: ${ JSON . stringify ( res ) } `
19271927 } )
1928- return _ . get ( res , 'body' )
1928+ const result = _ . get ( res , 'body' )
1929+ return _ . extend ( result , { name : _ . unescape ( _ . get ( result , 'name' ) ) } )
19291930}
19301931
19311932/**
0 commit comments