Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-05-17 12:33:31 +02:00
parent f20bf2f8e3
commit 8e40da01fc

View File

@ -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[];