@ -4,7 +4,7 @@ const url =
|
|||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? "http://payload:3001"
|
? "http://payload:3001"
|
||||||
: `https://${process.env.PAYLOAD_URL}`;
|
: `https://${process.env.PAYLOAD_URL}`;
|
||||||
|
//test
|
||||||
export const getPosts = async () =>
|
export const getPosts = async () =>
|
||||||
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user