import { getCourseList } from '../api'

export interface CourseType {
  id: string
  name: string
}

const courses = ref<CourseType[]>([])

export function useGetCourseList() {
  function updateCourses() {
    getCourseList().then((res: any) => {
      courses.value = res.data
    })
  }
  return { courses, updateCourses }
}
