changed links for hosting

This commit is contained in:
2025-09-02 20:34:20 +02:00
parent ba0f06e104
commit af4abfc8f9
7 changed files with 13 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
useEffect(() => {
if (Cookies.get("token")) {
const verifyToken = async () => {
const response = await fetch("http://localhost:8002/api/verifyToken", {
const response = await fetch("https://backend.insta.the1s.de/api/verifyToken", {
method: "GET",
headers: {
Authorization: `Bearer ${Cookies.get("token")}`,

View File

@@ -59,7 +59,7 @@ const ItemTable: React.FC = () => {
const fetchData = async () => {
setIsLoading(true);
try {
const response = await fetch("http://localhost:8002/api/allItems", {
const response = await fetch("https://backend.insta.the1s.de/api/allItems", {
method: "GET",
headers: {
Authorization: `Bearer ${Cookies.get("token")}`,

View File

@@ -55,7 +55,7 @@ const LoanTable: React.FC = () => {
const fetchData = async () => {
setIsLoading(true);
try {
const response = await fetch("http://localhost:8002/api/allLoans", {
const response = await fetch("https://backend.insta.the1s.de/api/allLoans", {
method: "GET",
headers: {
Authorization: `Bearer ${Cookies.get("token")}`,

View File

@@ -1,7 +1,7 @@
import Cookies from "js-cookie";
export const fetchUserData = async () => {
const response = await fetch("http://localhost:8002/api/allUsers", {
const response = await fetch("https://backend.insta.the1s.de/api/allUsers", {
headers: {
Authorization: `Bearer ${Cookies.get("token")}`,
},

View File

@@ -13,7 +13,7 @@ export const loginFunc = async (
password: string
): Promise<LoginResult> => {
try {
const response = await fetch("http://localhost:8002/api/loginAdmin", {
const response = await fetch("https://backend.insta.the1s.de/api/loginAdmin", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username, password }),

View File

@@ -3,7 +3,7 @@ import Cookies from "js-cookie";
export const handleDelete = async (userId: number) => {
try {
const response = await fetch(
`http://localhost:8002/api/deleteUser/${userId}`,
`https://backend.insta.the1s.de/api/deleteUser/${userId}`,
{
method: "DELETE",
headers: {
@@ -29,7 +29,7 @@ export const handleEdit = async (
) => {
try {
const response = await fetch(
`http://localhost:8002/api/editUser/${userId}`,
`https://backend.insta.the1s.de/api/editUser/${userId}`,
{
method: "PUT",
headers: {
@@ -55,7 +55,7 @@ export const createUser = async (
password: string
) => {
try {
const response = await fetch(`http://localhost:8002/api/createUser`, {
const response = await fetch(`https://backend.insta.the1s.de/api/createUser`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -76,7 +76,7 @@ export const createUser = async (
export const deleteLoan = async (loanId: number) => {
try {
const response = await fetch(
`http://localhost:8002/api/deleteLoan/${loanId}`,
`https://backend.insta.the1s.de/api/deleteLoan/${loanId}`,
{
method: "DELETE",
headers: {
@@ -97,7 +97,7 @@ export const deleteLoan = async (loanId: number) => {
export const deleteItem = async (itemId: number) => {
try {
const response = await fetch(
`http://localhost:8002/api/deleteItem/${itemId}`,
`https://backend.insta.the1s.de/api/deleteItem/${itemId}`,
{
method: "DELETE",
headers: {
@@ -120,7 +120,7 @@ export const createItem = async (
can_borrow_role: number
) => {
try {
const response = await fetch(`http://localhost:8002/api/createItem`, {
const response = await fetch(`https://backend.insta.the1s.de/api/createItem`, {
method: "POST",
headers: {
"Content-Type": "application/json",