Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -19,7 +19,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Calendars API
|
||||
* @brief Downloads Category API
|
||||
*/
|
||||
class _categories extends \IPS\Node\Api\NodeController
|
||||
{
|
||||
@@ -30,9 +30,9 @@ class _categories extends \IPS\Node\Api\NodeController
|
||||
|
||||
/**
|
||||
* GET /downloads/category
|
||||
* Get list of calendars
|
||||
* Get list of categories
|
||||
*
|
||||
* @return \IPS\Api\PaginatedResponse<IPS\calendar\Calendar>
|
||||
* @return \IPS\Api\PaginatedResponse<IPS\downloads\Category>
|
||||
*/
|
||||
public function GETindex()
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class _categories extends \IPS\Node\Api\NodeController
|
||||
*/
|
||||
public function POSTindex()
|
||||
{
|
||||
return $this->_create();
|
||||
return new \IPS\Api\Response( 201, $this->_create()->apiOutput( $this->member ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,11 +95,10 @@ class _categories extends \IPS\Node\Api\NodeController
|
||||
*/
|
||||
public function POSTitem( $id )
|
||||
{
|
||||
$class = static::$class;
|
||||
$class = $this->class;
|
||||
$category = $class::load( $id );
|
||||
$category = $this->_createOrUpdate( $category );
|
||||
|
||||
return $category;
|
||||
|
||||
return new \IPS\Api\Response( 201, $this->_createOrUpdate( $category )->apiOutput( $this->member ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +116,7 @@ class _categories extends \IPS\Node\Api\NodeController
|
||||
/**
|
||||
* Create or update node
|
||||
*
|
||||
* @param \IPS\node\Model $node The node
|
||||
* @param \IPS\node\Model $category The node
|
||||
* @return \IPS\node\Model
|
||||
*/
|
||||
protected function _createOrUpdate( \IPS\node\Model $category )
|
||||
|
||||
Reference in new issue
Block a user