Skip to content

Commit

Permalink
fix: import
Browse files Browse the repository at this point in the history
  • Loading branch information
SIY1121 committed Mar 16, 2021
1 parent 087254e commit 2596cff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ async function importEventsIfNotExist(year: number) {

// TODO 後で消す
async function importModuleIfNotExist(year: number) {
logger.info(`importing module${year}.json...`)
if ((await getModuleTermsUseCase(year)).length === 0) {
logger.info(`importing module${year}.json...`)
const data = JSON.parse(
fs.readFileSync('./school-calendar/module2021.json', 'utf-8')
fs.readFileSync(`./school-calendar/module${year}.json`, 'utf-8')
) as {
year: number
module: keyof typeof ModuleEnum
Expand Down

0 comments on commit 2596cff

Please sign in to comment.