dm1sh 60779ea489
Updated poetry to use latest api
Added poem id, changed url, fixed formatting, enabled actual fetching
2023-08-08 19:26:37 +03:00

20 lines
379 B
TypeScript

import { API_URL } from '../../config'
import { PoetryResponse, Poetry } from './types'
const initialPoetry: Poetry = {
title: '',
text: '',
author: '',
id: 0,
}
const composePoetryURL = () => (
API_URL + '/user/poem?'
)
const processPoetry = (data: PoetryResponse): Poetry => {
return data
}
export { initialPoetry, composePoetryURL, processPoetry }