Viewer to Server

This commit is contained in:
2023-02-16 15:17:31 -07:00
parent 5c50078c04
commit a25dc93610
968 changed files with 16395 additions and 2385 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using OI.Metrology.Shared.DataModels;
using OI.Metrology.Shared.Repositories;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Services;
using System;
using System.IO;
@ -8,13 +8,13 @@ using System.IO;
namespace OI.Metrology.Archive.ApiControllers;
public class AttachmentsController : Controller
{
private readonly IMetrologyRepo _Repo;
private readonly IAttachmentsService _AttachmentsService;
private readonly IMetrologyRepository _MetrologyRepository;
public AttachmentsController(IMetrologyRepo repo, IAttachmentsService attachmentsService)
public AttachmentsController(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService)
{
_Repo = repo;
_AttachmentsService = attachmentsService;
_MetrologyRepository = metrologyRepository;
}
// this endpoint was created in hope that it would make retrieving attachments to display in OpenInsight easier
@ -27,7 +27,7 @@ public class AttachmentsController : Controller
string title,
string filename)
{
ToolType tt = _Repo.GetToolTypeByName(toolTypeName);
ToolType tt = _MetrologyRepository.GetToolTypeByName(toolTypeName);
bool header = !string.Equals(tabletype.Trim(), "data", StringComparison.OrdinalIgnoreCase);