Skip to content

Commit

Permalink
Samples Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleteti committed Nov 1, 2023
1 parent ca28352 commit 6590e50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion samples/activerecord_showcase/EntitiesU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ TCustomerEx = class(TCustomer)
'FROM CUSTOMERS c WHERE city IS NOT NULL AND city <> '''' ORDER BY customers_in_the_same_city')]
TCustomerStats = class(TCustomEntity)
private
[MVCTableField('id', [foPrimaryKey, foAutoGenerated])]
[MVCTableField('id')]
fID: NullableInt64;
[MVCTableField('code')]
fCode: NullableString;
Expand Down
11 changes: 1 addition & 10 deletions samples/functional_actions_showcase/ControllerU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface

uses
MVCFramework, MVCFramework.Commons, MVCFramework.Serializer.Commons,
System.Generics.Collections, Data.DB, JsonDataObjects;
System.Generics.Collections, Data.DB, JsonDataObjects, System.Rtti;

type
[MVCNameCase(ncCamelCase)]
Expand Down Expand Up @@ -51,8 +51,6 @@ TMyController = class(TMVCController)
[MVCPath('/objects/jsonarray')]
function GetJSONArray: TJsonArray;



{ actions returning datasets }
[MVCPath('/datasets/single')]
function GetSingleDataSet: TDataSet;
Expand All @@ -78,8 +76,6 @@ TMyController = class(TMVCController)
function GetMVCResponseWithObjectList: IMVCResponse;
[MVCPath('/mvcresponse/dictionary')]
function GetMVCResponseWithObjectDictionary: IMVCResponse;
[MVCPath('/mvcresponse/error')]
function GetMVCErrorResponse: IMVCResponse;
[MVCPath('/mvcresponse/message/builder/headers')]
function GetMVCResponseSimpleBuilderWithHeaders: IMVCResponse;
end;
Expand Down Expand Up @@ -163,11 +159,6 @@ function TMyController.GetMultipleRecords: TArray<TPersonRec>;
Inc(Result[2].Age, 20);
end;

function TMyController.GetMVCErrorResponse: IMVCResponse;
begin
Result := TMVCErrorResponse.Create(500, 'boom');
end;

function TMyController.GetMVCResponseSimple: IMVCResponse;
begin
Result := MVCResponseBuilder
Expand Down
2 changes: 1 addition & 1 deletion samples/serversideviews_mustache/WebModuleU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ procedure TWebModule1.WebModuleCreate(Sender: TObject);
end)
.AddController(TWebSiteController)
.SetViewEngine(TMVCMustacheViewEngine)
.AddSerializer(TMVCMediaType.APPLICATION_FORM_URLENCODED, TMVCURLEncodedDataSerializer.Create);
.AddSerializer(TMVCMediaType.APPLICATION_FORM_URLENCODED, TMVCURLEncodedSerializer.Create);
end;

procedure TWebModule1.WebModuleDestroy(Sender: TObject);
Expand Down

0 comments on commit 6590e50

Please sign in to comment.