Skip to content

Commit

Permalink
modif proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-science committed Apr 17, 2021
1 parent 32b0cad commit 76a7a52
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/application2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Application2 extends Component {
event.preventDefault();
console.log("state envois demande amis : ",this.state)
// requête POST
fetch('http://localhost:4000/app/newfriend', {
fetch('https://ichatt.herokuapp.com/app/newfriend', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand All @@ -60,7 +60,7 @@ export default class Application2 extends Component {
})
}
componentDidMount(){
fetch('http://localhost:4000/app/friendlist', {
fetch('https://ichatt.herokuapp.com/app/friendlist', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/barre-amis-gauche.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class barregaucheamis extends Component {


componentDidMount(){
fetch('http://localhost:4000/app/friendlist', {
fetch('https://ichatt.herokuapp.com/app/friendlist', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/barre-gauche.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class barregauche extends Component {
};
}
componentDidMount(){
fetch('http://localhost:4000/app/friendlist', {
fetch('https://ichatt.herokuapp.com/app/friendlist', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
6 changes: 3 additions & 3 deletions src/components/chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import FriendNom from './friend_nom'



const socket = io('http://localhost:4000');
const socket = io('https://ichatt.herokuapp.com/');
export default class Chat extends Component {
// création du state "message"
constructor(props) {
Expand Down Expand Up @@ -35,7 +35,7 @@ export default class Chat extends Component {
componentDidMount(){
this.setState({friendid:this.props.valeur})
this.setState({user_nom:this.props.nom})
fetch('http://localhost:4000/app/getgroupechatlist', {
fetch('https://ichatt.herokuapp.com/app/getgroupechatlist', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand All @@ -60,7 +60,7 @@ export default class Chat extends Component {
componentDidUpdate(){
if(this.state.friendid !== this.props.valeur){
this.setState({friendid:this.props.valeur})
fetch('http://localhost:4000/app/getgroupechatlist', {
fetch('https://ichatt.herokuapp.com/app/getgroupechatlist', {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
Expand Down
4 changes: 2 additions & 2 deletions src/components/friend_nom.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class friend_nom extends Component {
};
}
componentDidMount(){
fetch('http://localhost:4000/app/getFriendName', {
fetch('https://ichatt.herokuapp.com/app/getFriendName', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand All @@ -30,7 +30,7 @@ export default class friend_nom extends Component {
}
componentDidUpdate(){
if(this.state.id != this.props.id){
fetch('http://localhost:4000/app/getFriendName', {
fetch('https://ichatt.herokuapp.com/app/getFriendName', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/components/paramètre.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class parametre extends Component {
onSubmit = async (event)=>{
event.preventDefault();
console.log(this.state)
const test = await fetch('http://localhost:4000/app/changeName', {
const test = await fetch('https://ichatt.herokuapp.com/app/changeName', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
4 changes: 2 additions & 2 deletions src/components/statistique.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class StatWithFriend extends Component {
};
}
componentDidMount(){
fetch('http://localhost:4000/app/statByUser', {
fetch('https://ichatt.herokuapp.com/app/statByUser', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand All @@ -29,7 +29,7 @@ export default class StatWithFriend extends Component {
this.setState({statistique_amis:response})
console.log("statistique : ",this.state.statistique_amis)
})
fetch('http://localhost:4000/app/friendlist', {
fetch('https://ichatt.herokuapp.com/app/friendlist', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
4 changes: 2 additions & 2 deletions src/friends-liste.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class friendsliste extends Component {
event.preventDefault();
console.log("state envois demande amis : ",this.state)
// requête POST
fetch('http://localhost:4000/app/newfriend', {
fetch('https://ichatt.herokuapp.com/app/newfriend', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand All @@ -64,7 +64,7 @@ export default class friendsliste extends Component {
this.setState({message:""});
}
componentDidMount(){
fetch('http://localhost:4000/app/friendlist', {
fetch('https://ichatt.herokuapp.com/app/friendlist', {
method: 'GET',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class login extends Component {
onSubmit = (event) => {
event.preventDefault();
console.log("state login : ",this.state)
fetch('http://localhost:4000/authentification/signin', {
fetch('https://ichatt.herokuapp.com/authentification/signin', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class signup extends Component {
event.preventDefault();
console.log("state signup : ",this.state);

fetch('http://localhost:4000/authentification/signup', {
fetch('https://ichatt.herokuapp.com/authentification/signup', {
method: 'POST',
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/withAuth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function withAuth(ComponentToProtect) {

// fait une requête POST au chemin "http://localhost:4000/auth" pour vérifier si les cookie sont valide
componentDidMount() {
fetch('http://localhost:4000/auth',{
fetch('https://ichatt.herokuapp.com/auth',{
// credentials : include permet d'intégrer les cookie avec la requête
credentials: 'include',
method: 'POST'
Expand Down

0 comments on commit 76a7a52

Please sign in to comment.