diff --git a/src/controllers/ImportDataController.ts b/src/controllers/ImportDataController.ts index 19479598..39619890 100644 --- a/src/controllers/ImportDataController.ts +++ b/src/controllers/ImportDataController.ts @@ -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);