import {
    readRawBody,
    getQuery,
    getMethod
} from 'h3'

// 获取入学流程列表
export default defineEventHandler(async (event) => {
    // 基础url
    const baseURL = process.env.NUXT_PROXY_WEB_API
    const method = getMethod(event).toUpperCase()
    let body
    if (method !== 'GET') body = await readRawBody(event)
    const res = await $fetch("https://houde.api.aerwen.net/api.php/Enrol.EnterSchoolProcess/getEnterSchoolProcessList", {
        method,
        baseURL: event.context.baseUrl,
        headers: event.context.headers,
        params: getQuery(event),
        body
    })
    return res
})