Update PAYLOAD_SERVER_URL to PAYLOAD_URL and remove unused env var
This commit is contained in:
@ -2,7 +2,7 @@ import type { Post } from "../types";
|
||||
|
||||
const url = import.meta.env.DEV
|
||||
? "http://payload:3001"
|
||||
: `${import.meta.env.PAYLOAD_SERVER_URL}`;
|
||||
: `${import.meta.env.PAYLOAD_URL}`;
|
||||
|
||||
export const getPosts = async () =>
|
||||
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
||||
|
Reference in New Issue
Block a user