Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
  • Loading branch information
mooxl committed May 17, 2023
1 parent f226c4c commit 48ae9c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astro/src/utils/payload.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Post } from "../types";

const url =
process.env.NODE_ENV === "development"
import.meta.env.NODE_ENV === "development"
? "http://payload:3001"
: `https://${process.env.PAYLOAD_URL}`;
: `https://${import.meta.env.PAYLOAD_URL}`;

export const getPosts = async () =>
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
Expand Down

0 comments on commit 48ae9c0

Please sign in to comment.