parent
39b932a81c
commit
1b1f8f2b09
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue