Optimize code, rebase api path, fix typo

This commit is contained in:
schooltechx 2023-04-08 16:15:15 +07:00
parent 16917a088f
commit d101d81763
13 changed files with 111 additions and 100 deletions

View file

@ -1,10 +1,10 @@
//import type {Exam} from '$lib/data/CMSDataType'
import {apibase} from '$lib/data/CMSDataType'
import { error } from '@sveltejs/kit'
import dayjs from 'dayjs'
import type { PageServerLoad } from './$types'
export const load: PageServerLoad = async ({params,fetch}) => {
const id = params.id+""
const res = await fetch("/api/qualifying/"+id)
const res = await fetch(apibase+"/qualifying/"+id)
if(res.status==404){
throw error(404,{message:`ค้นหาข้อมูลสอบคัดเลือก ${id}ไม่พบ`})
}

View file

@ -18,7 +18,7 @@
</a>
</li>
<li>
<span class="breadTaxt">ประกาศเกี่ยวกับการคัดเลือกบุคลากรกทม.</span>
<span class="breadTaxt">ประกาศเกี่ยวกับการคัดเลือกบุคลากรของกทม.</span>
</li>
</ul>
</div>