thainv-dev: fix ui
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { H3Event } from 'h3';
|
||||
interface Base {
|
||||
createdBy?: string | number
|
||||
createdOn?: string
|
||||
@@ -88,3 +89,24 @@ export const getArticleBySlug = async (event : any) => {
|
||||
handleError(error);
|
||||
}
|
||||
}
|
||||
|
||||
export const listArticleCondition = async (event: H3Event) => {
|
||||
try {
|
||||
const payload = await readBody<any>(event)
|
||||
const { apiUrl } = useRuntimeConfig().public
|
||||
const { items }: any = await $fetch(`${apiUrl}/cms/article/condition`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Site: 1
|
||||
},
|
||||
body: {
|
||||
payload
|
||||
}
|
||||
})
|
||||
// log(event)
|
||||
|
||||
return items
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user