import { Command } from 'nestjs-command' ; import { Injectable } from '@nestjs/common' ; import { IcalService } from './ical.service' ; @ Injectable ( ) export class ICalCommand { constructor ( private readonly icalService ) { } @ Command ( { command : 'ical:scrape' , describe : 'scrape ical for a course' , autoExit : true , } ) async create ( ) { await this . icalService . updateAllCourses ( ) ; } }