public async Task <IActionResult> GetDocByID([FromQuery] PlanDocs model) { try { return(Ok(await new PlanDocs().GetDocByIDAsync(model, contextWeb))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> UploadPlanDocs([FromForm] FileUpload model) { string initialPath = appSettings.File.PB_PlanDocsInitialPath; try { PlanDocs planDocs = await new PlanDocs().UploadFileAsync(model: model, initialPath: initialPath); return(Ok(planDocs)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }