This commit is contained in:
@@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
// using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using AyaNova.Models;
|
||||
using AyaNova.Api.ControllerHelpers;
|
||||
@@ -104,12 +104,12 @@ namespace AyaNova.Api.Controllers
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
|
||||
var oSrc = await biz.GetAsync(id, false);
|
||||
if (oSrc == null)
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
// var oSrc = await biz.GetAsync(id, false);
|
||||
// if (oSrc == null)
|
||||
// return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
|
||||
//Create and validate
|
||||
WorkOrder o = await biz.DuplicateAsync(oSrc);
|
||||
WorkOrder o = await biz.DuplicateAsync(id);
|
||||
if (o == null)
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Biz
|
||||
//DUPLICATE
|
||||
//
|
||||
|
||||
internal async Task<WorkOrder> DuplicateAsync(WorkOrder dbObj)
|
||||
internal async Task<WorkOrder> DuplicateAsync(long id)
|
||||
{
|
||||
throw new System.NotImplementedException("STUB: WORKORDER DUPLICATE");
|
||||
// WorkOrder outObj = new WorkOrder();
|
||||
|
||||
Reference in New Issue
Block a user