refactor: rename base to generic
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/563/head
parent
eb15e48b76
commit
a5f1685987
|
@ -27,7 +27,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class AlbumsController extends ApiBase
|
class AlbumsController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Files\Folder;
|
use OCP\Files\Folder;
|
||||||
|
|
||||||
class ArchiveController extends ApiBase
|
class ArchiveController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -28,7 +28,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class DaysController extends ApiBase
|
class DaysController extends GenericApiController
|
||||||
{
|
{
|
||||||
use FoldersTrait;
|
use FoldersTrait;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ use OCP\ISession;
|
||||||
use OCP\ITempManager;
|
use OCP\ITempManager;
|
||||||
use OCP\Security\ISecureRandom;
|
use OCP\Security\ISecureRandom;
|
||||||
|
|
||||||
class DownloadController extends ApiBase
|
class DownloadController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -34,11 +34,11 @@ use OCP\IRequest;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
abstract class ApiBase extends Controller
|
abstract class GenericApiController extends Controller
|
||||||
{
|
{
|
||||||
use ApiBaseFs;
|
use GenericApiControllerFs;
|
||||||
use ApiBaseParams;
|
use GenericApiControllerParams;
|
||||||
use ApiBaseUtils;
|
use GenericApiControllerUtils;
|
||||||
|
|
||||||
protected IConfig $config;
|
protected IConfig $config;
|
||||||
protected IUserSession $userSession;
|
protected IUserSession $userSession;
|
|
@ -33,10 +33,10 @@ use OCP\Files\IRootFolder;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
|
|
||||||
trait ApiBaseFs
|
trait GenericApiControllerFs
|
||||||
{
|
{
|
||||||
use ApiBaseParams;
|
use GenericApiControllerParams;
|
||||||
use ApiBaseUtils;
|
use GenericApiControllerUtils;
|
||||||
|
|
||||||
protected IConfig $config;
|
protected IConfig $config;
|
||||||
protected IUserSession $userSession;
|
protected IUserSession $userSession;
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCA\Memories\Controller;
|
namespace OCA\Memories\Controller;
|
||||||
|
|
||||||
trait ApiBaseParams
|
trait GenericApiControllerParams
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* current request.
|
* current request.
|
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\DataDisplayResponse;
|
use OCP\AppFramework\Http\DataDisplayResponse;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
|
||||||
trait ApiBaseUtils
|
trait GenericApiControllerUtils
|
||||||
{
|
{
|
||||||
protected IAppManager $appManager;
|
protected IAppManager $appManager;
|
||||||
protected IConfig $config;
|
protected IConfig $config;
|
|
@ -31,7 +31,7 @@ use OCP\AppFramework\Http\FileDisplayResponse;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Files\IRootFolder;
|
use OCP\Files\IRootFolder;
|
||||||
|
|
||||||
class ImageController extends ApiBase
|
class ImageController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -27,7 +27,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class MapController extends ApiBase
|
class MapController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -29,7 +29,7 @@ use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\AppFramework\Http\StreamResponse;
|
use OCP\AppFramework\Http\StreamResponse;
|
||||||
|
|
||||||
class OtherController extends ApiBase
|
class OtherController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -30,7 +30,7 @@ use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Files\FileInfo;
|
use OCP\Files\FileInfo;
|
||||||
|
|
||||||
class PeopleController extends ApiBase
|
class PeopleController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -27,7 +27,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class PlacesController extends ApiBase
|
class PlacesController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -27,7 +27,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class ShareController extends ApiBase
|
class ShareController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -27,7 +27,7 @@ use OCA\Memories\Errors;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
class TagsController extends ApiBase
|
class TagsController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
|
@ -30,7 +30,7 @@ use OCP\AppFramework\Http\DataDisplayResponse;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Files\File;
|
use OCP\Files\File;
|
||||||
|
|
||||||
class VideoController extends ApiBase
|
class VideoController extends GenericApiController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
|
Loading…
Reference in New Issue