8 lines
228 B
TypeScript
8 lines
228 B
TypeScript
|
|
import axios from "axios";
|
||
|
|
|
||
|
|
export const fetcher = (url: string) => axios.get(url).then((res) => res.data);
|
||
|
|
|
||
|
|
export function createPoster(data: object) {
|
||
|
|
return (url: string) => axios.post(url, data).then((res) => res.data);
|
||
|
|
}
|