2021-05-03 19:29:01 +02:00
|
|
|
unit Controllers.Base;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
MVCFramework, MVCFramework.Commons;
|
|
|
|
|
|
|
|
type
|
|
|
|
TBaseController = class abstract(TMVCController)
|
|
|
|
strict protected
|
|
|
|
public
|
|
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
|
|
|
|
[MVCPath('/private')]
|
|
|
|
TPrivateController = class(TBaseController)
|
|
|
|
public
|
|
|
|
[MVCPath('/articles')]
|
|
|
|
[MVCHTTPMethods([httpDELETE])]
|
|
|
|
procedure DeleteAllArticles;
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
|
|
|
System.SysUtils;
|
|
|
|
|
|
|
|
{ TBaseController }
|
|
|
|
|
|
|
|
destructor TBaseController.Destroy;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{ TPrivateController }
|
|
|
|
|
|
|
|
procedure TPrivateController.DeleteAllArticles;
|
|
|
|
begin
|
2022-08-28 13:06:16 +02:00
|
|
|
raise EMVCException.Create(HTTP_STATUS.NotImplemented, 'Not Implemented');
|
2021-05-03 19:29:01 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|