Merge branch 'refactor'
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
import { apiClient } from '@/shared/api/client'
|
||||
import type { InfoPageBlock } from '../model/types'
|
||||
|
||||
|
||||
export type InfoPageBlock = {
|
||||
id: string
|
||||
key: string
|
||||
title: string
|
||||
body: string
|
||||
sort: number
|
||||
published: boolean
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export async function fetchPublicInfoBlocks(): Promise<{ items: InfoPageBlock[] }> {
|
||||
const { data } = await apiClient.get<{ items: InfoPageBlock[] }>('info-page/blocks')
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
export {
|
||||
fetchPublicInfoBlocks,
|
||||
fetchAdminInfoBlocks,
|
||||
createInfoBlock,
|
||||
updateInfoBlock,
|
||||
deleteInfoBlock,
|
||||
} from './api/info-page-api'
|
||||
export type { InfoPageBlock } from './model/types'
|
||||
@@ -0,0 +1,10 @@
|
||||
export type InfoPageBlock = {
|
||||
id: string
|
||||
key: string
|
||||
title: string
|
||||
body: string
|
||||
sort: number
|
||||
published: boolean
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
Reference in New Issue
Block a user