Merge pull request #15 from oqtane/master

sync
This commit is contained in:
Shaun Walker 2020-05-01 08:02:05 -04:00 committed by GitHub
commit 1ed730cafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0-preview5.20216.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0-preview5.20216.8" PrivateAssets="all" />
<!-- <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0-preview5.20216.8" />-->
<!-- <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0-preview5.20216.8" PrivateAssets="all" />-->
<PackageReference Include="System.Net.Http.Json" Version="3.2.0-preview5.20210.3" />
</ItemGroup>

View File

@ -144,7 +144,7 @@
{
profile = new Profile();
}
profile.Name = _name;
profile.Title = _title;
profile.Description = _description;
@ -154,8 +154,14 @@
profile.DefaultValue = _defaultvalue;
profile.IsRequired = (_isrequired == null ? false : Boolean.Parse(_isrequired));
profile.IsPrivate = (_isprivate == null ? false : Boolean.Parse(_isprivate));
profile = await ProfileService.UpdateProfileAsync(profile);
if (_profileid != -1)
{
profile = await ProfileService.UpdateProfileAsync(profile);
}else
{
profile = await ProfileService.AddProfileAsync(profile);
}
await logger.LogInformation("Profile Saved {Profile}", profile);
NavigationManager.NavigateTo(NavigateUrl());
}