Add devices.destroy API call
This commit is contained in:
		
							parent
							
								
									35405f8612
								
							
						
					
					
						commit
						e930881e0f
					
				| @ -71,6 +71,21 @@ OAUTH3.api['devices.detach'] = function (providerUri, opts) { | ||||
|   }); | ||||
| }; | ||||
| 
 | ||||
| OAUTH3.api['devices.destroy'] = function (providerUri, opts) { | ||||
|   var session = opts.session; | ||||
|   var device = opts.device; | ||||
| 
 | ||||
|   return OAUTH3.request({ | ||||
|     url: OAUTH3.url.normalize(providerUri) | ||||
|       + '/api/com.daplie.domains/accounts/' + session.token.sub | ||||
| 			+ '/devices/' + device | ||||
|   , method: 'DELETE' | ||||
|   , session: session | ||||
|   }, {}).then(function (res) { | ||||
|     return res.data.device || res.data; | ||||
|   }); | ||||
| }; | ||||
| 
 | ||||
| OAUTH3.api['dns.set'] = function (providerUri, opts) { | ||||
|   var session = opts.session; | ||||
|   var tld = opts.tld; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user