File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ function prepareRequest (data) {
4848 myInit = { method : 'GET' }
4949 break
5050
51+ case 'getMyProfiles' :
52+ url = `${ url } /getMyProfiles`
53+ myInit = { method : 'GET' }
54+ break
55+
56+
5157 default :
5258 break
5359 }
Original file line number Diff line number Diff line change @@ -182,6 +182,24 @@ class GlpiRestClient {
182182 }
183183 } )
184184 }
185+
186+ getMyProfiles ( ) {
187+ return new Promise ( ( resolve , reject ) => {
188+ try {
189+ const data = {
190+ function : 'getMyProfiles'
191+ }
192+ this . _makeRequest ( prepareRequest ( data ) , 'getMyProfiles' , ( promise ) => {
193+ promise . then ( response => {
194+ resolve ( response )
195+ } )
196+ } )
197+ }
198+ catch ( err ) {
199+ reject ( err )
200+ }
201+ } )
202+ }
185203}
186204
187205export default GlpiRestClient
You can’t perform that action at this time.
0 commit comments