Skip to content

Commit

Permalink
added and integrated deploy endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
RobWiggins committed Aug 9, 2019
1 parent 5357457 commit 3129568
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
API_ENDPOINT: 'http://localhost:8000/api',
API_ENDPOINT: 'https://spaced-rep-server1.herokuapp.com',
TOKEN_KEY: 'blogful-client-auth-token',
}
6 changes: 3 additions & 3 deletions src/services/auth-api-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TokenService from './token-service'

const AuthApiService = {
postUser(user) {
return fetch(`${config.API_ENDPOINT}/user`, {
return fetch(`${config.API_ENDPOINT}/api/user`, {
method: 'POST',
headers: {
'content-type': 'application/json',
Expand All @@ -17,7 +17,7 @@ const AuthApiService = {
)
},
postLogin({ username, password }) {
return fetch(`${config.API_ENDPOINT}/auth/token`, {
return fetch(`${config.API_ENDPOINT}/api/auth/token`, {
method: 'POST',
headers: {
'content-type': 'application/json',
Expand All @@ -31,7 +31,7 @@ const AuthApiService = {
)
},
refreshToken() {
return fetch(`${config.API_ENDPOINT}/auth/token`, {
return fetch(`${config.API_ENDPOINT}/api/auth/token`, {
method: 'PUT',
headers: {
'authorization': `Bearer ${TokenService.getAuthToken()}`,
Expand Down
6 changes: 3 additions & 3 deletions src/services/language-api-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import LearningContext from '../contexts/LearningContext'
const LanguageApiService = {
getWords() {
console.log('Getting words');
return fetch(`${config.API_ENDPOINT}/language`, {
return fetch(`${config.API_ENDPOINT}/api/language`, {
method: 'GET',
headers: {
'authorization': `Bearer ${TokenService.getAuthToken()}`
Expand All @@ -19,7 +19,7 @@ const LanguageApiService = {
},
getHead() {
console.log('Getting words');
return fetch(`${config.API_ENDPOINT}/language/head`, {
return fetch(`${config.API_ENDPOINT}/api/language/head`, {
method: 'GET',
headers: {
'authorization': `Bearer ${TokenService.getAuthToken()}`
Expand All @@ -38,7 +38,7 @@ const LanguageApiService = {
guess: guess
});

return fetch(`${config.API_ENDPOINT}/language/guess`, {
return fetch(`${config.API_ENDPOINT}/api/language/guess`, {
method: 'POST',
headers: {
'authorization': `Bearer ${TokenService.getAuthToken()}`,
Expand Down

0 comments on commit 3129568

Please sign in to comment.