Explorar el Código

Latest Prop to return 4, Test on CORS

master
George Williams hace 4 años
padre
commit
0898a9b5f1

+ 1
- 1
UnivateProperties_API/Repository/Properties/PropertyRepository.cs Ver fichero

@@ -582,7 +582,7 @@ namespace UnivateProperties_API.Repository.Properties
582 582
 
583 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 586
             return GetDisplayDetails(props);
587 587
         }
588 588
 

+ 2
- 0
UnivateProperties_API/Startup.cs Ver fichero

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

Loading…
Cancelar
Guardar