17 lines
411 B
TypeScript
17 lines
411 B
TypeScript
|
import { Injectable } from '@nestjs/common';
|
||
|
import { Command } from 'nestjs-command';
|
||
|
import { CountriesService } from './countries.service';
|
||
|
|
||
|
@Injectable()
|
||
|
export class CountriesCommand {
|
||
|
constructor(private readonly service: CountriesService) {}
|
||
|
|
||
|
@Command({
|
||
|
command: 'countries:import',
|
||
|
describe: 'Import Countries database',
|
||
|
})
|
||
|
async import() {
|
||
|
await this.service.pullCountries();
|
||
|
}
|
||
|
}
|