Rename and fixes

This commit is contained in:
Karolis Kundrotas
2021-09-10 11:59:34 +03:00
parent 257308e096
commit c3bb8983ef
29 changed files with 11 additions and 27 deletions

View File

@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31606.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KTUSA PS", "KTUSA PS\KTUSA PS.csproj", "{D86FA38D-E6E6-48DA-AE1A-007D9FDB3ED8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KTUSAPS", "KTUSAPS\KTUSAPS.csproj", "{D86FA38D-E6E6-48DA-AE1A-007D9FDB3ED8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KTUSAPS.Data", "KTUSAPS.Data\KTUSAPS.Data.csproj", "{CF02E79E-4B41-4E48-B2FC-094665980F89}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KTUSAPS.Data", "KTUSAPS.Data\KTUSAPS.Data.csproj", "{CF02E79E-4B41-4E48-B2FC-094665980F89}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace KTUSA_PS.Controllers
namespace KTUSAPS.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace KTUSA_PS.Controllers
namespace KTUSAPS.Controllers
{
[Route("[controller]")]
[Authorize]

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>KTUSA_PS</RootNamespace>
<RootNamespace>KTUSAPS</RootNamespace>
</PropertyGroup>
<PropertyGroup>
@@ -22,10 +22,6 @@
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<ItemGroup>
<None Remove="ClientApp\src\assets\NewFile.txt" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
@@ -40,12 +36,10 @@
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
<DistFiles Include="$(SpaRoot)dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>

View File

@@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace KTUSA_PS
namespace KTUSAPS
{
public class Program
{

View File

@@ -16,7 +16,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"KTUSA_PS": {
"KTUSAPS": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "weatherforecast",

View File

@@ -1,19 +1,12 @@
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using VueCliMiddleware;
namespace KTUSA_PS
namespace KTUSAPS
{
public class Startup
{
@@ -30,7 +23,7 @@ namespace KTUSA_PS
services.AddControllers();
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp";
configuration.RootPath = "ClientApp/dist";
});
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
@@ -69,10 +62,7 @@ namespace KTUSA_PS
app.UseSpa(spa =>
{
if (env.IsDevelopment())
spa.Options.SourcePath = "ClientApp/";
else
spa.Options.SourcePath = "dist";
spa.Options.SourcePath = "ClientApp/";
if (env.IsDevelopment())
{