Browse Source

Latest Prop to return 4, Test on CORS

master
George Williams 4 years ago
parent
commit
0898a9b5f1

+ 1
- 1
UnivateProperties_API/Repository/Properties/PropertyRepository.cs View File

582
 
582
 
583
         public List<PropertyDisplay> GetLatestDisplay()
583
         public List<PropertyDisplay> GetLatestDisplay()
584
         {
584
         {
585
-            List<Property> props = GetAll().Where(x => x.Published).OrderByDescending(x => x.DatePublished).Take(3).ToList();
585
+            List<Property> props = GetAll().Where(x => x.Published).OrderByDescending(x => x.DatePublished).Take(4).ToList();
586
             return GetDisplayDetails(props);
586
             return GetDisplayDetails(props);
587
         }
587
         }
588
 
588
 

+ 2
- 0
UnivateProperties_API/Startup.cs View File

53
             services.AddCors(o => o.AddPolicy("MyPolicy", builder =>
53
             services.AddCors(o => o.AddPolicy("MyPolicy", builder =>
54
             {
54
             {
55
                 builder.AllowAnyOrigin()
55
                 builder.AllowAnyOrigin()
56
+                        .WithOrigins("http://training.provision-sa.com:122/")
56
                        .AllowAnyMethod()
57
                        .AllowAnyMethod()
57
                        .AllowAnyHeader();                       
58
                        .AllowAnyHeader();                       
58
             }));            
59
             }));            
181
                 app.UseDeveloperExceptionPage();
182
                 app.UseDeveloperExceptionPage();
182
             }
183
             }
183
             app.UseCors(x => x
184
             app.UseCors(x => x
185
+                .WithOrigins("http://training.provision-sa.com:122/")
184
                 .AllowAnyOrigin()
186
                 .AllowAnyOrigin()
185
                 .AllowAnyMethod()
187
                 .AllowAnyMethod()
186
                 .AllowAnyHeader());                
188
                 .AllowAnyHeader());                

Loading…
Cancel
Save