Updated auth test
This commit is contained in:
+8
-7
@@ -1,11 +1,12 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
// Create a temp token
|
const res = (await axios.post('http://localhost:3000/api/auth', {
|
||||||
axios.post('http://localhost:3000/api/auth', {
|
|
||||||
intents: 'server',
|
intents: 'server',
|
||||||
server_ip: 'localhost'
|
server_ip: 'localhost'
|
||||||
}).then((r) => {
|
})).data;
|
||||||
console.log(r.data);
|
|
||||||
}).catch((e) => {
|
const token = res.token;
|
||||||
console.log(e);
|
|
||||||
});
|
const output = (await axios.get('http://localhost:3000/api/auth?intents=server&token='+token)).data;
|
||||||
|
|
||||||
|
console.log(output);
|
||||||
Reference in New Issue
Block a user