Added uploaded by in response of upload document API
This commit is contained in:
parent
d57395efcd
commit
08232ee34f
@ -6,8 +6,7 @@
|
|||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public string? RegexExpression { get; set; }
|
public string? RegexExpression { get; set; }
|
||||||
public string AllowedContentType { get; set; } = string.Empty;
|
public string AllowedContentType { get; set; } = string.Empty;
|
||||||
public int MaxFilesAllowed { get; set; }
|
public double MaxSizeAllowedInMB { get; set; }
|
||||||
public double MaxSizeAllowedInKB { get; set; }
|
|
||||||
public bool IsValidationRequired { get; set; }
|
public bool IsValidationRequired { get; set; }
|
||||||
public bool IsMandatory { get; set; }
|
public bool IsMandatory { get; set; }
|
||||||
public bool IsSystem { get; set; }
|
public bool IsSystem { get; set; }
|
||||||
|
@ -5,6 +5,7 @@ using Marco.Pms.Model.Dtos.DocumentManager;
|
|||||||
using Marco.Pms.Model.Entitlements;
|
using Marco.Pms.Model.Entitlements;
|
||||||
using Marco.Pms.Model.Filters;
|
using Marco.Pms.Model.Filters;
|
||||||
using Marco.Pms.Model.Utilities;
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Marco.Pms.Model.ViewModels.Activities;
|
||||||
using Marco.Pms.Model.ViewModels.DocumentManager;
|
using Marco.Pms.Model.ViewModels.DocumentManager;
|
||||||
using Marco.Pms.Services.Service;
|
using Marco.Pms.Services.Service;
|
||||||
using MarcoBMS.Services.Helpers;
|
using MarcoBMS.Services.Helpers;
|
||||||
@ -485,6 +486,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
logger.LogInfo("Document uploaded successfully. AttachmentId: {AttachmentId}, DocumentId: {DocumentId}", attachment.Id, document.Id);
|
logger.LogInfo("Document uploaded successfully. AttachmentId: {AttachmentId}, DocumentId: {DocumentId}", attachment.Id, document.Id);
|
||||||
|
|
||||||
var response = _mapper.Map<DocumentListVM>(attachment);
|
var response = _mapper.Map<DocumentListVM>(attachment);
|
||||||
|
response.UploadedBy = _mapper.Map<BasicEmployeeVM>(loggedInEmployee);
|
||||||
return Ok(ApiResponse<object>.SuccessResponse(response, "Document added successfully", 200));
|
return Ok(ApiResponse<object>.SuccessResponse(response, "Document added successfully", 200));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user