Merge branch 'online' into apommier
This commit is contained in:
commit
f137b84893
6
.env
6
.env
@ -14,9 +14,9 @@
|
|||||||
NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf"
|
NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf"
|
||||||
|
|
||||||
# BASE_URL=http://localhost
|
# BASE_URL=http://localhost
|
||||||
BASE_URL=localhost
|
BASE_URL=92.143.191.152
|
||||||
REACT_APP_BASE_URL=localhost
|
REACT_APP_BASE_URL=92.143.191.152
|
||||||
REDIRECT_URI=http://localhost/api/auth/login
|
REDIRECT_URI=http://92.143.191.152/api/auth/login
|
||||||
#postgres var
|
#postgres var
|
||||||
# POSTGRES_HOST=127.0.0.1
|
# POSTGRES_HOST=127.0.0.1
|
||||||
# DB_TYPE=postgres
|
# DB_TYPE=postgres
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
|
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/06/17 01:00:00 by apommier #+# #+# */
|
/* Created: 2023/06/17 01:00:00 by apommier #+# #+# */
|
||||||
/* Updated: 2023/06/18 13:30:50 by apommier ### ########.fr */
|
/* Updated: 2023/06/18 17:45:39 by apommier ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -419,6 +419,8 @@ export class AppController {
|
|||||||
if (!amIhere)
|
if (!amIhere)
|
||||||
data.members.push(req.user.username)
|
data.members.push(req.user.username)
|
||||||
// let test = {id: 2, members: "cc"};
|
// let test = {id: 2, members: "cc"};
|
||||||
|
data.admin = []
|
||||||
|
data.admin.push(req.user.username)
|
||||||
data.owner = req.user.username
|
data.owner = req.user.username
|
||||||
data.group = true;
|
data.group = true;
|
||||||
return await this.chatService.createConv(data);
|
return await this.chatService.createConv(data);
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
REACT_APP_BASE_URL=localhost
|
# REACT_APP_BASE_URL=localhost
|
||||||
|
REACT_APP_BASE_URL=92.143.191.152
|
||||||
# REACT_APP_BASE_URL=192.168.1.19
|
# REACT_APP_BASE_URL=192.168.1.19
|
||||||
@ -77,7 +77,7 @@ const Modal = ({handleClose}) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveSelectedOptions = () => {
|
const saveSelectedOptions = async () => {
|
||||||
// const selectedOptions = selectTags.map((tag) => tag.selectedOption);
|
// const selectedOptions = selectTags.map((tag) => tag.selectedOption);
|
||||||
const selectedOptions = selectTags.map((tag) => tag.selectedOption).filter((option) => option !== '');
|
const selectedOptions = selectTags.map((tag) => tag.selectedOption).filter((option) => option !== '');
|
||||||
|
|
||||||
@ -88,8 +88,9 @@ const Modal = ({handleClose}) => {
|
|||||||
}
|
}
|
||||||
try{
|
try{
|
||||||
// test
|
// test
|
||||||
api.post("/conv", data);
|
await api.post("/conv", data);
|
||||||
handleClose();
|
handleClose();
|
||||||
|
window.location.reload(false);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ function Login42()
|
|||||||
client_id: 'u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41',
|
client_id: 'u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41',
|
||||||
client_secret: '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',
|
client_secret: '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',
|
||||||
code: code,
|
code: code,
|
||||||
redirect_uri: 'http://localhost:8080/login42',
|
redirect_uri: 'http://' + process.env.REACT_APP_BASE_URL + '/login42',
|
||||||
};
|
};
|
||||||
|
|
||||||
axios.post('https://api.intra.42.fr/oauth/token', data)
|
axios.post('https://api.intra.42.fr/oauth/token', data)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user