Fix: Remove localhost from API URL
This commit is contained in:
parent
238b594b1e
commit
e24049b1fb
4 changed files with 10 additions and 10 deletions
|
@ -73,7 +73,7 @@ export default function Signin() {
|
|||
router.push('/')
|
||||
}
|
||||
|
||||
fetch('http://localhost:3000/api/account/decks/', {
|
||||
fetch('/api/account/decks/', {
|
||||
method: "GET",
|
||||
headers: {Authorization: 'Bearer ' + token},
|
||||
}).then((res) => {
|
||||
|
@ -84,7 +84,7 @@ export default function Signin() {
|
|||
}
|
||||
})
|
||||
|
||||
fetch('http://localhost:8072/misc/bsets.json').then((res) => {
|
||||
fetch('/api/json/misc/bsets.json').then((res) => {
|
||||
if(res.status == 200) {
|
||||
res.json().then((data) => {
|
||||
setBsets(data)
|
||||
|
@ -107,7 +107,7 @@ export default function Signin() {
|
|||
}
|
||||
|
||||
function deleteDeck(id:string){
|
||||
fetch('http://localhost:3000/api/account/decks/delete', {
|
||||
fetch('/api/account/decks/delete', {
|
||||
method: "DELETE",
|
||||
headers: {Authorization: 'Bearer ' + token},
|
||||
body: JSON.stringify({ id })
|
||||
|
@ -137,7 +137,7 @@ export default function Signin() {
|
|||
});
|
||||
console.log(dataToSend)
|
||||
|
||||
fetch('http://localhost:3000/api/account/decks/create', {
|
||||
fetch('/api/account/decks/create', {
|
||||
method: "POST",
|
||||
headers: {Authorization: 'Bearer ' + token},
|
||||
body: JSON.stringify(dataToSend)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue