no message
This commit is contained in:
parent
9aada985a9
commit
8f7f8eaab6
1 changed files with 5 additions and 8 deletions
|
|
@ -23,8 +23,8 @@ import { FileInterceptor } from "@nestjs/platform-express";
|
|||
import * as xlsx from "xlsx";
|
||||
import { ProfileEducation } from "../entities/ProfileEducation";
|
||||
|
||||
@Route("api/v1/development/scholarship")
|
||||
@Tags("DevelopmentScholarship")
|
||||
@Route("api/v1/org/upload")
|
||||
@Tags("UPLOAD")
|
||||
@Security("bearerAuth")
|
||||
export class ImportDataController extends Controller {
|
||||
private educationRepository = AppDataSource.getRepository(ProfileEducation);
|
||||
|
|
@ -34,14 +34,11 @@ export class ImportDataController extends Controller {
|
|||
* @summary DEV_0 - upload EDU #
|
||||
*
|
||||
*/
|
||||
@Post("upload")
|
||||
@Post("")
|
||||
@UseInterceptors(FileInterceptor("file"))
|
||||
async UploadUserDevelopemtById(
|
||||
@UploadedFile() file: Express.Multer.File,
|
||||
) {
|
||||
|
||||
async UploadUserDevelopemtById(@UploadedFile() file: Express.Multer.File) {
|
||||
const workbook = xlsx.read(file.buffer, { type: "buffer" });
|
||||
const sheetName = workbook.SheetNames[1];
|
||||
const sheetName = workbook.SheetNames[1];
|
||||
const sheet = workbook.Sheets[sheetName];
|
||||
const getEducations = xlsx.utils.sheet_to_json(sheet);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue