Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

학교 급식을 잘못 가져오는 오류가 있습니다. #11

Closed
cjaewon opened this issue Jan 28, 2020 · 2 comments
Closed

학교 급식을 잘못 가져오는 오류가 있습니다. #11

cjaewon opened this issue Jan 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@cjaewon
Copy link
Contributor

cjaewon commented Jan 28, 2020

school-kr(최신 버전)으로 학교 급식을 파싱해봤는데 다른 학교 급식이 뜨는 것 같아요.
node-school-kr(업데이트 전 버전)을 가지고 테스트를 해봤는데 그때는 급식이 뜨지 않습니다(이게 정상)

`/**
 * @description 샘플 테스트 코드입니다.
 */

const School = require('node-school-kr')


/* 인스턴스 생성 */
const school = new School()

async function sample () {


  // 경기도 지역의 광명경영회계고등학교로 초기화
  school.init(School.Type.MIDDLE, School.Region.BUSAN, 'C100000795')

  const meal = await school.getMeal()
  // const meal = await scool.getMeal(2020, 3)
  // const meal = await school.getMeal({
  //   year: 2020,
  //   month: 3,
  //   default: '급식 없음'
  // })

  const calendar = await school.getCalendar()
  // const meal = await scool.getCalendar(2020, 3)
  // const meal = await school.getMeal({
  //   year: 2020,
  //   month: 3,
  //   default: '일정 없음',
  //   separator: '\n'
  // })

  console.log(meal)
  console.log(calendar)
}

sample()
`/**
 * @description 샘플 테스트 코드입니다.
 */

const School = require('school-kr')


/* 인스턴스 생성 */
const school = new School()

async function sample () {

  // 경기도 지역의 광명경영회계고등학교로 초기화
  school.init(School.Type.MIDDLE, School.Region.BUSAN, 'C100000795')

  const meal = await school.getMeal()
  // const meal = await scool.getMeal(2020, 3)
  // const meal = await school.getMeal({
  //   year: 2020,
  //   month: 3,
  //   default: '급식 없음'
  // })

  const calendar = await school.getCalendar()
  // const meal = await scool.getCalendar(2020, 3)
  // const meal = await school.getMeal({
  //   year: 2020,
  //   month: 3,
  //   default: '일정 없음',
  //   separator: '\n'
  // })

  console.log(meal)
  console.log(calendar)
}

sample()
@cjaewon
Copy link
Contributor Author

cjaewon commented Jan 28, 2020

  • 부산에 다른 학교도 이럴 가능성이 높은 것 같습니다.

@leegeunhyeok leegeunhyeok added the bug Something isn't working label Jan 29, 2020
@leegeunhyeok
Copy link
Owner

이슈 감사합니다.

확인 결과 2.x 버전에서 3.x 버전으로 업데이트 하는 과정에서 불필요한 기능까지 함께 포함한 탓에 관련 문제가 발생한 것으로 확인되었습니다.

자세한 사항은 여기를 참고해주세요

3.0.2 버전으로 업데이트하여 배포될 예정입니다.

감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants