Skip to content

Commit

Permalink
Fixed backend not running on linux and mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Honeyloveet committed Jun 19, 2023
1 parent ae2209c commit 0f09423
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 135 deletions.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions backend/src/mms.api/Controllers/ReportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ public async Task<IActionResult> GetReportById(string id)
return Ok(result);
}

[HttpGet("downloadReport/{reportId}")]
public async Task<IActionResult> GetDownloadPdf(string reportId)
{
var result = await Mediator.Send(new DownloadReportCommand { Id = reportId });
return File(result,"application/octet-stream", "report.pdf");
}


[HttpPost("report")]
public async Task<IActionResult> CreateTask(CreateReportCommand command)
{
Expand Down
8 changes: 0 additions & 8 deletions backend/src/mms.api/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using DinkToPdf.Contracts;
using DinkToPdf;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using mms.api.Configurations;
Expand All @@ -10,8 +8,6 @@
using mms.Infrastructure;
using mms.Infrastructure.Context;
using mms.Infrastructure.Seeder;
using mms.Application.Report.Command;
using System.IO;

var builder = WebApplication.CreateBuilder(args);

Expand All @@ -24,10 +20,6 @@
builder.Logging.AddConsole();

// Add services to the container.
CustomAssemblyLoadContext context = new CustomAssemblyLoadContext();
context.LoadUnmanagedLibrary(Path.Combine(Directory.GetCurrentDirectory(), "libraries/libwkhtmltox.dll"));
builder.Services.AddSingleton(typeof(IConverter),
new SynchronizedConverter(new PdfTools()));
builder.Services.AddControllers();
builder.Services.AddSignalR();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
Expand Down
Binary file removed backend/src/mms.api/libraries/libwkhtmltox.dll
Binary file not shown.
Binary file removed backend/src/mms.api/libraries/libwkhtmltox.dylib
Binary file not shown.
Binary file removed backend/src/mms.api/libraries/libwkhtmltox.so
Binary file not shown.
31 changes: 21 additions & 10 deletions frontend/mms-Admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions frontend/mms-Admin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3969,7 +3969,7 @@ postcss-value-parser@^4.0.2:
resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==

postcss@^8.4.21:
postcss@^8.4.23:
version "8.4.23"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz"
integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==
Expand Down Expand Up @@ -4332,10 +4332,10 @@ rimraf@^3.0.2:
dependencies:
glob "^7.1.3"

rollup@^1.20.0||^2.0.0||^3.0.0, rollup@^3.20.2:
version "3.20.7"
resolved "https://registry.npmjs.org/rollup/-/rollup-3.20.7.tgz"
integrity sha512-P7E2zezKSLhWnTz46XxjSmInrbOCiul1yf+kJccMxT56vxjHwCbDfoLbiqFgu+WQoo9ij2PkraYaBstgB2prBA==
rollup@^1.20.0||^2.0.0||^3.0.0, rollup@^3.21.0:
version "3.25.1"
resolved "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz"
integrity sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==
optionalDependencies:
fsevents "~2.3.2"

Expand Down Expand Up @@ -4881,13 +4881,13 @@ vite-plugin-svgr@^2.4.0:
"@svgr/core" "^6.5.1"

"vite@^2.6.0 || 3 || 4", vite@^4.1.0-beta.0, vite@^4.2.0:
version "4.3.1"
resolved "https://registry.npmjs.org/vite/-/vite-4.3.1.tgz"
integrity sha512-EPmfPLAI79Z/RofuMvkIS0Yr091T2ReUoXQqc5ppBX/sjFRhHKiPPF/R46cTdoci/XgeQpB23diiJxq5w30vdg==
version "4.3.9"
resolved "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz"
integrity sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==
dependencies:
esbuild "^0.17.5"
postcss "^8.4.21"
rollup "^3.20.2"
postcss "^8.4.23"
rollup "^3.21.0"
optionalDependencies:
fsevents "~2.3.2"

Expand Down

0 comments on commit 0f09423

Please sign in to comment.