30117125 4 年之前
父節點
當前提交
7e9a75b53a

+ 1
- 1
UnivateProperties_API/Repository/Properties/PropertyRepository.cs 查看文件

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
- 2
UnivateProperties_API/Startup.cs 查看文件

52
             services.AddAutoMapper();
52
             services.AddAutoMapper();
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
                        .AllowAnyMethod()
56
                        .AllowAnyMethod()
57
                        .AllowAnyHeader();                       
57
                        .AllowAnyHeader();                       
58
             }));            
58
             }));            
181
             {
181
             {
182
                 app.UseDeveloperExceptionPage();
182
                 app.UseDeveloperExceptionPage();
183
             }
183
             }
184
-            app.UseCors(x => x
184
+            app.UseCors(x => x                
185
                 .AllowAnyOrigin()
185
                 .AllowAnyOrigin()
186
                 .AllowAnyMethod()
186
                 .AllowAnyMethod()
187
                 .AllowAnyHeader());                
187
                 .AllowAnyHeader());                

Loading…
取消
儲存