public HttpResponseMessage CreateJobsDocumentTypes([FromUri] string token) { if (!CheckAuthorisationToken(token)) { return(Request.CreateResponse(HttpStatusCode.Forbidden)); } try { UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobsHomeDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobSearchResultsDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobsComponentDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobsRssDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(ProblemJobsRssDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobsSearchDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(JobAdvertDocumentType)); return(Request.CreateResponse(HttpStatusCode.Created)); } catch (Exception e) { e.ToExceptionless().Submit(); return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }
public HttpResponseMessage CreateUmbracoDocumentTypes([FromUri] string token) { if (!CheckAuthorisationToken(token)) { return(Request.CreateResponse(HttpStatusCode.Forbidden)); } try { UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(HomePageItemDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(HomePageItemsDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(HomePageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(WebChatDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(LegacyBaseDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(LandingPageWithPicturesDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(StandardLandingPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(StandardTopicPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(StandardDownloadPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(MapDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(FormDownloadDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilPlanHomePageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilPlanBudgetPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilPlanMonitoringPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilPlanPrioritiesPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilPlanTopicPageDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CustomerFocusBaseDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(LandingDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(TaskDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(LocationDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(GuideStepDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(GuideDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(RecyclingSiteDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(LibraryDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(MobileLibraryStopDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(ChildcareDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CouncilOfficeDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(SportLocationDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(ParkDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(RegistrationOfficeDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(DayCentreDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(PersonDocumentType)); return(Request.CreateResponse(HttpStatusCode.Created)); } catch (Exception e) { e.ToExceptionless().Submit(); return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }
public HttpResponseMessage CreateCampaignDocumentTypes([FromUri] string token) { if (!CheckAuthorisationToken(token)) { return(Request.CreateResponse(HttpStatusCode.Forbidden)); } try { UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CampaignLandingDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CampaignContentDocumentType)); UmbracoCodeFirstInitializer.CreateOrUpdateEntity(typeof(CampaignTilesDocumentType)); return(Request.CreateResponse(HttpStatusCode.Created)); } catch (Exception e) { e.ToExceptionless().Submit(); return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }