23
									
								
								src/controllers/ImportController.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/controllers/ImportController.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| import { Body, ContentType, Controller, Post } from 'routing-controllers'; | ||||
| import { OpenAPI } from 'routing-controllers-openapi'; | ||||
|  | ||||
| @Controller('/import') | ||||
| //@Authorized("IMPORT:read") | ||||
| export class ImportController { | ||||
|     // private runnerRepository: Repository<Runner>; | ||||
|  | ||||
|     /** | ||||
|      * Gets the repository of this controller's model/entity. | ||||
|      */ | ||||
|     constructor() { | ||||
|         //this.runnerRepository = getConnectionManager().get().getRepository(Runner); | ||||
|     } | ||||
|  | ||||
|     @Post() | ||||
|     @ContentType("text/csv") | ||||
|     @OpenAPI({ description: "Create new runners based on a csv file" }) | ||||
|     async post(@Body() body: any) { | ||||
|         console.log(body) | ||||
|         return body; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user