Ejemplo n.º 1
0
        private static void MapPageApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            routeBuilder
            .ForAdminApiController <PageBlockTypesApiController>("page-block-types")
            .MapGet()
            .MapGetById("{pageBlockTypeId:int}")
            ;

            var pageIdRoute = "{pageId:int}";

            routeBuilder
            .ForAdminApiController <PagesApiController>("pages")
            .MapGet()
            .MapGetById(pageIdRoute)
            .MapPost()
            .MapPatch(pageIdRoute)
            .MapPut(pageIdRoute + "/url", "PutPageUrl")
            .MapDelete(pageIdRoute)
            .MapPost(pageIdRoute + "/duplicate", "PostDuplicate")
            ;

            var pageVersionBlockIdRoute = "{pageVersionBlockId:int}";

            routeBuilder
            .ForAdminApiController <PageVersionRegionBlocksApiController>("page-version-region-blocks")
            .MapGet(pageVersionBlockIdRoute)
            .MapPost()
            .MapPut(pageVersionBlockIdRoute)
            .MapDelete(pageVersionBlockIdRoute)
            .MapPut(pageVersionBlockIdRoute + "/move-up", "MoveUp")
            .MapPut(pageVersionBlockIdRoute + "/move-down", "MoveDown")
            ;

            routeBuilder
            .ForAdminApiController <PageVersionsApiController>("pages/{pageId:int}/versions")
            .MapGet()
            .MapPost()
            .MapPatch("draft", "PatchDraft")
            .MapDelete("draft", "DeleteDraft")
            .MapPatch("draft/publish", "Publish")
            .MapPatch("published/unpublish", "UnPublish")
            ;

            routeBuilder
            .ForAdminApiController <PageAccessRulesApiController>("pages/{pageId:int}/access-rules")
            .MapGet()
            .MapPatch()
            ;
        }
Ejemplo n.º 2
0
 private static void MapLocaleApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <LocalesApiController>("locales")
     .MapGet()
     ;
 }
Ejemplo n.º 3
0
 private static void MapDynamicDataApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <NestedDataModelSchemaApiController>("nested-data-model-schemas")
     .MapGet("{dataModelName}")
     ;
 }
Ejemplo n.º 4
0
 private static void MapDashboardApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <DashboardApiController>("dashboard")
     .MapGet()
     ;
 }
Ejemplo n.º 5
0
 private static void MapSetupApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <SetupApiController>("setup")
     .MapPost()
     ;
 }
Ejemplo n.º 6
0
 private static void MapAccountApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <AccountApiController>("account")
     .MapGet()
     .MapPatch()
     .MapPut("Password", "PutPassword");
 }
Ejemplo n.º 7
0
 private static void MapPageTemplateApiRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <PageTemplatesApiController>("page-templates")
     .MapGet()
     .MapGetById("{id:int}")
     ;
 }
Ejemplo n.º 8
0
        private static void MapUserApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            routeBuilder
            .ForAdminApiController <UserAreasApiController>("user-areas")
            .MapGet()
            ;

            var userIdRoute = "{userId:int}";

            routeBuilder
            .ForAdminApiController <UsersApiController>("users")
            .MapGet()
            .MapGetById(userIdRoute)
            .MapPost()
            .MapPatch(userIdRoute)
            .MapDelete(userIdRoute)
            ;
        }
Ejemplo n.º 9
0
        private static void MapSettingsApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            routeBuilder
            .ForAdminApiController <CacheApiController>("cache")
            .MapDelete()
            ;

            var generalRoute  = "GeneralSite";
            var settingsRoute = "Seo";

            routeBuilder
            .ForAdminApiController <SettingsApiController>("settings")
            .MapGet(generalRoute, "GetGeneralSiteSettings")
            .MapGet(settingsRoute, "GetSeoSettings")
            .MapPatch(generalRoute, "PatchGeneralSiteSettings")
            .MapPatch(settingsRoute, "PatchSeoSettings")
            ;
        }
Ejemplo n.º 10
0
        private static void MapRolesApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            routeBuilder
            .ForAdminApiController <PermissionsApiController>("permissions")
            .MapGet()
            ;

            var roleIdRoute = "{roleId:int}";

            routeBuilder
            .ForAdminApiController <RolesApiController>("roles")
            .MapGet()
            .MapGetById(roleIdRoute)
            .MapPost()
            .MapPatch(roleIdRoute)
            .MapDelete(roleIdRoute)
            ;
        }
Ejemplo n.º 11
0
        private static void MapDocumentApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            routeBuilder
            .ForAdminApiController <DocumentFileTypesApiController>("document-file-types")
            .MapGet()
            ;

            var documentAssetIdRoute = "{documentAssetId:int}";

            routeBuilder
            .ForAdminApiController <DocumentsApiController>("documents")
            .MapGet()
            .MapGetById(documentAssetIdRoute)
            .MapPost()
            .MapPut(documentAssetIdRoute)
            .MapDelete(documentAssetIdRoute)
            ;
        }
Ejemplo n.º 12
0
        private static void MapPageDirectoryApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            var pageDirectoryIdRoute = "{pageDirectoryId:int}";

            routeBuilder
            .ForAdminApiController <PageDirectoriesApiController>("page-directories")
            .MapGet()
            .MapGet("tree", "GetTree")
            .MapGetById(pageDirectoryIdRoute)
            .MapPost()
            .MapPatch(pageDirectoryIdRoute)
            .MapDelete(pageDirectoryIdRoute)
            .MapPut(pageDirectoryIdRoute + "/url", "PutUrl")
            ;

            routeBuilder
            .ForAdminApiController <PageDirectoryAccessRulesApiController>("page-directories/{pageDirectoryId:int}/access-rules")
            .MapGet()
            .MapPatch()
            ;
        }
Ejemplo n.º 13
0
        private static void MapCustomEntityApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            var customEntityIdRoute = "{customEntityId:int}";

            routeBuilder
            .ForAdminApiController <CustomEntitiesApiController>("custom-entities")
            .MapGet()
            .MapGetById(customEntityIdRoute)
            .MapPost()
            .MapPut("ordering", "PutOrdering")
            .MapPut(customEntityIdRoute + "/url", "PutCustomEntityUrl")
            .MapDelete(customEntityIdRoute)
            .MapPost(customEntityIdRoute + "/duplicate", "PostDuplicate")
            ;

            routeBuilder
            .ForAdminApiController <CustomEntityDataModelSchemaApiController>("custom-entity-data-model-schemas")
            .MapGet()
            .MapGet("{customEntityDefinitionCode}", "GetDataModelSchema")
            ;

            var customEntityDefinitionCodeRoute = "{customEntityDefinitionCode}";

            routeBuilder
            .ForAdminApiController <CustomEntityDefinitionsApiController>("custom-entity-definitions")
            .MapGet()
            .MapGetById(customEntityDefinitionCodeRoute)
            .MapGet(customEntityDefinitionCodeRoute + "/routes", "GetCustomEntityRoutes")
            .MapGet(customEntityDefinitionCodeRoute + "/data-model-schema", "GetDataModelSchema")
            .MapGet(customEntityDefinitionCodeRoute + "/custom-entities", "GetCustomEntities")
            ;

            routeBuilder
            .ForAdminApiController <CustomEntityRoutingRulesApiController>("custom-entity-routing-rules")
            .MapGet()
            ;

            var customEntityVersionPageBlockIdRoute = "{customEntityVersionPageBlockId:int}";

            routeBuilder
            .ForAdminApiController <CustomEntityVersionPageBlocksApiController>("custom-entity-version-page-blocks")
            .MapGet(customEntityVersionPageBlockIdRoute)
            .MapPost()
            .MapPut(customEntityVersionPageBlockIdRoute)
            .MapDelete(customEntityVersionPageBlockIdRoute)
            .MapPut(customEntityVersionPageBlockIdRoute + "/move-up", "MoveUp")
            .MapPut(customEntityVersionPageBlockIdRoute + "/move-down", "MoveDown")
            ;

            routeBuilder
            .ForAdminApiController <CustomEntityVersionsApiController>("custom-entities/{customEntityId:int}/versions")
            .MapGet()
            .MapPost()
            .MapPut("draft", "PutDraft")
            .MapDelete("draft", "DeleteDraft")
            .MapPatch("draft/publish", "Publish")
            .MapPatch("published/unpublish", "UnPublish")
            ;
        }
Ejemplo n.º 14
0
        private static void MapImageApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            var imageAssetIdRoute = "{imageAssetId:int}";

            routeBuilder
            .ForAdminApiController <ImagesApiController>("images")
            .MapGet()
            .MapGetById(imageAssetIdRoute)
            .MapPost()
            .MapPut(imageAssetIdRoute)
            .MapDelete(imageAssetIdRoute)
            ;
        }
Ejemplo n.º 15
0
        private static void MapUserApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            var userAreaCodeRoute = "{userAreaCode}";

            routeBuilder
            .ForAdminApiController <UserAreasApiController>("user-areas")
            .MapGet()
            .MapGet(userAreaCodeRoute + "/password-policy", "GetPasswordPolicy")
            ;

            var userIdRoute = "{userId:int}";

            routeBuilder
            .ForAdminApiController <UsersApiController>("users")
            .MapGet()
            .MapGetById(userIdRoute)
            .MapPost()
            .MapPatch(userIdRoute)
            .MapPut(userIdRoute + "/reset-password", "PutResetPassword")
            .MapDelete(userIdRoute)
            ;
        }
Ejemplo n.º 16
0
        private static void MapPageDirectoryApiRoutes(IEndpointRouteBuilder routeBuilder)
        {
            var pageDirectoryIdRoute = "{pageDirectoryId:int}";

            routeBuilder
            .ForAdminApiController <PageDirectoriesApiController>("page-directories")
            .MapGet()
            .MapGet("tree", "GetTree")
            .MapGetById(pageDirectoryIdRoute)
            .MapPost()
            .MapPatch(pageDirectoryIdRoute)
            .MapDelete(pageDirectoryIdRoute)
            ;
        }
Ejemplo n.º 17
0
 public void RegisterRoutes(IEndpointRouteBuilder routeBuilder)
 {
     routeBuilder
     .ForAdminApiController <YouTubeSettingsApiController>("plugins/youtube-settings")
     .MapGet();
 }