Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+8 -3
View File
@@ -28,7 +28,7 @@ class _lkey extends \IPS\Api\Controller
* Get information about a specific purchase from its license key
*
* @param string $lkey License key
* @throws 2X310/1 INVALID_KEY The license key does not exist
* @throws 2X310/1 INVALID_KEY The license key does not exist or the authorized user does not have permission to view it
* @return \IPS\nexus\Purchase
*/
public function GETitem( $lkey )
@@ -37,8 +37,12 @@ class _lkey extends \IPS\Api\Controller
{
$licenseKey = \IPS\nexus\Purchase\LicenseKey::load( $lkey );
$purchase = $licenseKey->purchase;
if ( $this->member and !$purchase->canView( $this->member ) )
{
throw new \OutOfRangeException;
}
return new \IPS\Api\Response( 200, $purchase->apiOutput() );
return new \IPS\Api\Response( 200, $purchase->apiOutput( $this->member ) );
}
catch ( \OutOfRangeException $e )
{
@@ -50,6 +54,7 @@ class _lkey extends \IPS\Api\Controller
* POST /nexus/lkey/{key}
* Update custom fields for a purchase from its license key
*
* @apiclientonly
* @apiparam object customFields Values for custom fields
* @throws 2X310/2 INVALID_KEY The license key does not exist
* @return \IPS\nexus\Purchase
@@ -78,6 +83,6 @@ class _lkey extends \IPS\Api\Controller
$purchase->save();
return new \IPS\Api\Response( 200, $purchase->apiOutput() );
return new \IPS\Api\Response( 200, $purchase->apiOutput( $this->member ) );
}
}