Tweaked the contents of env variables, read more
NEWS_URI and AUTH_URI had the end of their routes lopped off, so I could reference /admin using either one of them.
This commit is contained in:
@@ -21,7 +21,7 @@ const Account = props => {
|
||||
|
||||
//grab the user's info
|
||||
useEffect(() => {
|
||||
authTokens.tokenFetch(`${process.env.AUTH_URI}/account`, {
|
||||
authTokens.tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
@@ -83,7 +83,7 @@ const update = async (password, retype, contact, tokenFetch) => {
|
||||
return ['Password is too short'];
|
||||
}
|
||||
|
||||
const result = await tokenFetch(`${process.env.AUTH_URI}/update`, {
|
||||
const result = await tokenFetch(`${process.env.AUTH_URI}/auth/account`, {
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
|
||||
@@ -6,7 +6,7 @@ const HomePage = props => {
|
||||
return (
|
||||
<div className='page'>
|
||||
<p>This is the MERN template homepage.</p>
|
||||
<NewsFeed uri={process.env.NEWS_URI} />
|
||||
<NewsFeed />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ const handleSubmit = async (email, password) => {
|
||||
}
|
||||
|
||||
//send to the auth server
|
||||
const result = await fetch(`${process.env.AUTH_URI}/login`, {
|
||||
const result = await fetch(`${process.env.AUTH_URI}/auth/login`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -82,7 +82,7 @@ const handleSubmit = async (email, username, password, retype, contact) => {
|
||||
}
|
||||
|
||||
//send to the auth server
|
||||
const result = await fetch(`${process.env.AUTH_URI}/signup`, {
|
||||
const result = await fetch(`${process.env.AUTH_URI}/auth/signup`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user