geobase/src/modules/countries/countries.command.ts

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();
}
}