Exemplo n.º 1
0
        public async Task <IActionResult> ReadFooterElementSettingsAsync(long elementId)
        {
            FooterElementSettings settings = await _footerElementService.ReadElementSettingsAsync(TenantId, elementId);

            if (settings == null)
            {
                return(NotFound());
            }
            return(Ok(settings));
        }
Exemplo n.º 2
0
        public async Task<IElementSettings> ReadElementSettingsAsync(long tenantId, Guid elementTypeId, long elementId)
        {
            switch (elementTypeId.ToString())
            {
                case "5401977d-865f-4a7a-b416-0a26305615de":
                    return await _codeSnippetElementService.ReadElementSettingsAsync(tenantId, elementId);

                case "f1c2b384-4909-47c8-ada7-cd3cc7f32620":
                    return await _footerElementService.ReadElementSettingsAsync(tenantId, elementId);

                case "c92ee4c4-b133-44cc-8322-640e99c334dc":
                    return await _htmlElementService.ReadElementSettingsAsync(tenantId, elementId);

                case "1cbac30c-5deb-404e-8ea8-aabc20c82aa8":
                    return await _pageHeaderElementService.ReadElementSettingsAsync(tenantId, elementId);

                case "cf0d7834-54fb-4a6e-86db-0f238f8b1ac1":
                    return await _shareElementService.ReadElementSettingsAsync(tenantId, elementId);

                default:
                    return null;
            }
        }