Update Astro and Payload dependencies

This commit is contained in:
Max Schmidt
2023-06-07 10:21:48 +02:00
parent 3a39f967ef
commit 36678d38b7
8 changed files with 417 additions and 557 deletions

View File

@ -2,7 +2,7 @@ import type { Post } from "../types";
const url = import.meta.env.DEV
? "http://payload:3001"
: `https://${import.meta.env.PAYLOAD_URL}`;
: `${import.meta.env.PAYLOAD_SERVER_URL}`;
export const getPosts = async () =>
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];