fixes
This commit is contained in:
@ -15,7 +15,7 @@ const Snippet = ({ id }) => {
|
||||
const { authTokens } = useContext(AuthContext);
|
||||
const [ snippet, setSnippet ] = useState("");
|
||||
const getSnippet = async (id) => {
|
||||
const response = await fetch(`http://127.0.0.1/api/snippets/${id}`, {
|
||||
const response = await fetch(`http://${process.env.REACT_APP_DOMAIN}/api/snippets/${id}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${authTokens.access}`,
|
||||
@ -31,7 +31,7 @@ const Snippet = ({ id }) => {
|
||||
}
|
||||
};
|
||||
const updateSnippet = async (id, snippet) => {
|
||||
const response = await fetch(`http://127.0.0.1/api/snippets/${id}`, {
|
||||
const response = await fetch(`http://${process.env.REACT_APP_DOMAIN}/api/snippets/${id}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${authTokens.access}`,
|
||||
|
||||
Reference in New Issue
Block a user