Преглед изворни кода

Updated Property Video

master
30117125 пре 4 година
родитељ
комит
f2f5d983b0

+ 5
- 2
UnivateProperties_API/Controllers/Users/RegisterController.cs Прегледај датотеку

@@ -1,10 +1,12 @@
1
-using AutoMapper;
1
+using Abp.Json;
2
+using AutoMapper;
2 3
 using Microsoft.AspNetCore.Authorization;
3 4
 using Microsoft.AspNetCore.Mvc;
4 5
 using Microsoft.Extensions.Options;
5 6
 using Microsoft.IdentityModel.Tokens;
6 7
 using System;
7 8
 using System.IdentityModel.Tokens.Jwt;
9
+using System.Net;
8 10
 using System.Security.Claims;
9 11
 using System.Text;
10 12
 using UnivateProperties_API.Containers.Users;
@@ -96,7 +98,8 @@ namespace UnivateProperties_API.Controllers.Users
96 98
             }
97 99
             catch (AppException ex)
98 100
             {
99
-                return BadRequest(new { messge = ex.Message });
101
+                //return BadRequest(new { message = ex.Message });
102
+                return StatusCode(409, ex);
100 103
             }
101 104
         }
102 105
 

+ 10
- 0
UnivateProperties_API/Repository/Properties/PropertyRepository.cs Прегледај датотеку

@@ -231,6 +231,16 @@ namespace UnivateProperties_API.Repository.Properties
231 231
             if (!string.IsNullOrEmpty(item.Video) && item.Video.StartsWith("http"))
232 232
                 item.Video = item.Video.Replace("https://www.youtube.com/watch?v=", "");
233 233
 
234
+            if (item.Video == "") 
235
+            {
236
+                item.Video = null;
237
+            }
238
+
239
+            if (item.VirtualTour == "")
240
+            {
241
+                item.VirtualTour = null;
242
+            }
243
+
234 244
             var property = new Property();
235 245
             foreach (string prop in property.GetAllProperties())
236 246
             {

Loading…
Откажи
Сачувај