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